diff --git a/v2/data/web-store-order-processor/Data1.xlsx b/v2/data/web-store-order-processor/Data1.xlsx new file mode 100644 index 00000000..5c02ab8b Binary files /dev/null and b/v2/data/web-store-order-processor/Data1.xlsx differ diff --git a/v2/data/web-store-order-processor/Data2.xlsx b/v2/data/web-store-order-processor/Data2.xlsx new file mode 100644 index 00000000..e2d948a7 Binary files /dev/null and b/v2/data/web-store-order-processor/Data2.xlsx differ diff --git a/v2/data/web-store-order-processor/Data3.xlsx b/v2/data/web-store-order-processor/Data3.xlsx new file mode 100644 index 00000000..5c02ab8b Binary files /dev/null and b/v2/data/web-store-order-processor/Data3.xlsx differ diff --git a/v2/data/web-store-order-processor/conda.yaml b/v2/data/web-store-order-processor/conda.yaml index d503c51e..d7ebc609 100644 --- a/v2/data/web-store-order-processor/conda.yaml +++ b/v2/data/web-store-order-processor/conda.yaml @@ -1,18 +1,14 @@ -# For more details on the format and content: -# https://github.com/robocorp/rcc/blob/master/docs/recipes.md#what-is-in-condayaml -# Tip: Adding a link to the release notes of the packages helps maintenance and security. - channels: - conda-forge dependencies: - - python=3.10.12 # https://pyreadiness.org/3.10 - - pip=23.2.1 # https://pip.pypa.io/en/stable/news - - robocorp-truststore=0.8.0 # https://pypi.org/project/robocorp-truststore/ - - nodejs=18.17.1 # https://github.com/nodejs/node/blob/main/CHANGELOG.md + - python=3.10.12 + - pip=23.2.1 + - robocorp-truststore=0.8.0 + - nodejs=18.17.1 - pip: - - robotframework-browser==17.5.2 # https://github.com/MarketSquare/robotframework-browser/releases - - rpaframework==27.6.0 # https://rpaframework.org/releasenotes.html + - robotframework-browser==17.5.2 + - rpaframework==27.6.0 rccPostInstall: - - rfbrowser init # Initialize Playwright \ No newline at end of file + - rfbrowser init \ No newline at end of file diff --git a/v2/data/web-store-order-processor/libraries/Orders.py b/v2/data/web-store-order-processor/libraries/Orders.py index 101ed5ac..28efceda 100644 --- a/v2/data/web-store-order-processor/libraries/Orders.py +++ b/v2/data/web-store-order-processor/libraries/Orders.py @@ -14,13 +14,14 @@ def get_orders(self, excel): orders = [] for row in table: - first_name, last_name = row["Name"].split() - order = { - "item": row["Item"], - "zip": int(row["Zip"]), - "first_name": first_name, - "last_name": last_name - } - orders.append(order) + if len(row["Name"]): + first_name, last_name = row["Name"].split() + order = { + "item": row["Item"], + "zip": int(row["Zip"]), + "first_name": first_name, + "last_name": last_name + } + orders.append(order) return orders diff --git a/v2/data/web-store-order-processor/tasks.robot b/v2/data/web-store-order-processor/tasks.robot index 39dd3be7..48b9fb0d 100644 --- a/v2/data/web-store-order-processor/tasks.robot +++ b/v2/data/web-store-order-processor/tasks.robot @@ -7,8 +7,7 @@ Documentation Swag order robot. Places orders at https://www.saucedemo.com Library OperatingSystem Library Orders Library RPA.Browser.Playwright -Library RPA.HTTP -Library RPA.Robocorp.Vault +# Library RPA.Robocorp.Vault *** Variables *** @@ -18,15 +17,22 @@ ${SWAG_LABS_URL}= https://www.saucedemo.com *** Tasks *** -Place orders - Process orders +First Order + Process orders 1 +Second Order + Process orders 2 + +Third Order + Process orders 3 + *** Keywords *** Process orders + [Arguments] ${file} Open Swag Labs Login standard_user secret_sauce - ${orders}= Collect orders + ${orders}= Collect orders ${file} FOR ${order} IN @{orders} Run Keyword And Continue On Failure Process order ${order} END @@ -51,8 +57,9 @@ Assert logged in Get Url == ${SWAG_LABS_URL}/inventory.html Collect orders - RPA.HTTP.Download ${EXCEL_FILE_URL} overwrite=True - ${orders}= Get Orders ${EXCEL_FILE_NAME} + [Arguments] ${datafile} + #RPA.HTTP.Download ${EXCEL_FILE_URL} overwrite=True + ${orders}= Get Orders ${CURDIR}${/}Data${datafile}.xlsx RETURN ${orders} Process order diff --git a/v2/data/windows-example-calculator/conda.yaml b/v2/data/windows-example-calculator/conda.yaml index ec852849..e4fa5a39 100644 --- a/v2/data/windows-example-calculator/conda.yaml +++ b/v2/data/windows-example-calculator/conda.yaml @@ -1,8 +1,3 @@ -# Generated environment configuration file. - -# Editing this file manually can prevent the project from being -# opened in Automation Studio. - channels: - conda-forge dependencies: diff --git a/v2/data/windows-example-calculator/robot.yaml b/v2/data/windows-example-calculator/robot.yaml index a0d919b7..ce26d08d 100644 --- a/v2/data/windows-example-calculator/robot.yaml +++ b/v2/data/windows-example-calculator/robot.yaml @@ -1,6 +1,16 @@ tasks: - Count My Veggies: - robotTaskName: Count My Veggies + Calc Demo: + command: + - python + - -m + - robot + - --report + - NONE + - -d + - output + - --logtitle + - Task log + - tasks.robot condaConfigFile: conda.yaml ignoreFiles: - .gitignore diff --git a/v2/data/windows-example-calculator/tasks.robot b/v2/data/windows-example-calculator/tasks.robot index 0da22427..f94fe9ad 100644 --- a/v2/data/windows-example-calculator/tasks.robot +++ b/v2/data/windows-example-calculator/tasks.robot @@ -13,24 +13,24 @@ ${OUTPUT_EXCEL} ${OUTPUT_DIR}${/}calculation_results.xlsx *** Tasks *** -Count My Veggies +Do Calculations [Documentation] A sample robot that reads two columns of input and outputs calculations - Check Veggies Excel And Start Calculator - ${inputs}= Read Veggies Excel - ${outputs}= Count Veggie Totals ${inputs} - Save Veggie Results Excel ${outputs} + Check Input FIle And Start Calculator + ${inputs}= Read Input Excel + ${outputs}= Calculate ${inputs} + Save Results In Excel ${outputs} Close Window name:Calculator *** Keywords *** -Read Veggies Excel +Read Input Excel [Documentation] Reads the Excel sheet for veggies Open Workbook ${INPUT_EXCEL} ${inputs}= Read Worksheet As Table Sheet1 ${TRUE} ${TRUE} Close Workbook RETURN ${inputs} -Count Veggie Totals +Calculate [Documentation] Counts the total amounts with Calculator Application [Arguments] ${table} ${totals}= Create List @@ -57,7 +57,7 @@ Input Number To Calc Click Calculator - ${digit} END -Save Veggie Results Excel +Save Results In Excel [Documentation] Writes the Excel sheet for total amounts of veggies [Arguments] ${outputs} Create Workbook ${CURDIR}${/}calculation_results.xlsx xlsx @@ -81,7 +81,7 @@ Get Result From Calc ${total}= Convert To Integer ${total} RETURN ${total} -Check Veggies Excel And Start Calculator +Check Input FIle And Start Calculator ${exists}= Does File Exist ${INPUT_EXCEL} IF not $exists Fail Missing input: ${INPUT_EXCEL} Windows Search Calculator