There is somekind of mistake with my code but I cannot figure out exactly what it is. I try to ask web page address from a user and use the input to access web page. I watched the videos and examples and did the same way, but this throws me an error. Here is a snippet of my code.
*** Tasks ***
Order robots from RobotSpareBin Industries Inc
Open the robot order website
Ask user for CSV path
Submit the form in FORLOOP
Create ZIP package from PDF Files
Close the Browser
*** Keywords ***
Open the robot order website
Open Available Browser ${URL}
Wait Until Page Contains Element css:.modal-content
Click Button OK
Ask user for CSV path
Add heading Insert URL for downloading CSV
Add text input URL for downloading CSV file placeholder=Insert URL here
${result}= Run dialog
RETURN ${result}
Download the CSV file
[Arguments] ${CSV_FILE_PATH}
Download ${CSV_FILE_PATH}= Ask user for CSV path overwrite=True
Submit the form in FORLOOP
[Arguments] ${result}
${List_of_orders}= Read table from CSV ${result} header=True
Close Workbook
FOR ${orders} IN @{List_of_orders}......
I guess there is still something wrong with my logic.
*** Tasks ***
Order robots from RobotSpareBin Industries Inc
Open the robot order website
${CSV_FILE_PATH}= Ask user for CSV path
Submit the form in FORLOOP ${CSV_FILE_PATH}
*** Keywords ***
Ask user for CSV path
Add heading Insert URL for downloading CSV
Add text input URL for downloading CSV file placeholder=Insert URL here
${result}= Run dialog
RETURN ${result}
Download the CSV file
[Arguments] ${CSV_FILE_PATH}
Download ${CSV_FILE_PATH}= Ask user for CSV path overwrite=True
Submit the form in FORLOOP
[Arguments] ${CSV_FILE_PATH}
${List_of_orders}= Read table from CSV ${CSV_FILE_PATH} header=True
Run dialog returns a result object with all input values . So if you want to return only url you need to access it in RETURN. There is example in documentation.