praveen42

Robocorp Tutorial I Error

May 22nd, 2021
131
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. *** Settings ***
  2. Documentation Robot to enter weekly sales data into the RobotSpareBin Industries Intranet.
  3. Library RPA.Browser.Selenium
  4. Library RPA.HTTP
  5. Library RPA.Excel.Files
  6. Library RPA.PDF
  7.  
  8.  
  9. *** Keywords ***
  10. Open The Intranet Website
  11. Open Available Browser https://robotsparebinindustries.com/
  12.  
  13.  
  14. *** Keywords ***
  15. Log In
  16. Input Text id:username maria
  17. Input Password id:password thoushallnotpass
  18. Submit Form
  19. Wait Until Page Contains Element id:sales-form
  20.  
  21.  
  22. *** Keywords ***
  23. Download The Excel file
  24. Download https://robotsparebinindustries.com/SalesData.xlsx overwrite=True
  25.  
  26.  
  27. *** Keywords ***
  28. Fill And Submit The Form For One Person
  29. [Arguments] ${sales_rep}
  30. Input Text firstname ${sales_rep}[First Name]
  31. Input Text lastname ${sales_rep}[Last Name]
  32. Input Text salesresult ${sales_rep}[Sales]
  33. ${target_as_string}= Convert To String ${sales_rep}[Sales Target]
  34. Select From List By Value salestarget ${target_as_string}
  35. Click Button Submit
  36.  
  37. *** Keywords ***
  38. Fill The Form Using The Data From The Excel File
  39. Open Workbook SalesData.xlsx
  40. ${sales_reps}= Read Worksheet As Table header=True
  41. Close Workbook
  42. FOR ${sales_rep} IN @{sales_reps}
  43. Fill And Submit The Form For One Person ${sales_rep}
  44. END
  45.  
  46.  
  47. *** Keywords ***
  48. Collect The Results
  49. Screenshot css:div.sales-summary ${CURDIR}${/}output${/}sales_summary.png
  50.  
  51.  
  52. *** Keywords***
  53. Export The Table As A PDF
  54. Wait Until Element Is Visible id:sales-results
  55. ${sales_results_html}= Get Element Attribute id:sales-results outerHTML
  56. Html To Pdf ${sales_results_html} ${CURDIR}${/}output${/}sales_results.pdf
  57.  
  58.  
  59. *** Keywords***
  60. Log Out And Close The Browser
  61. Click Button Log out
  62. Close Browser
  63.  
  64.  
  65. *** Tasks ***
  66. Insert the sales data for the week and export it as a PDF
  67. Open The Intranet Website
  68. Log In
  69. Download The Excel File
  70. Fill The Form Using The Data From The Excel File
  71. Collect The Results
  72. Export The Table As A PDF
  73. [Teardown] Log Out And Close The Browser
  74.  
RAW Paste Data