-
Notifications
You must be signed in to change notification settings - Fork 0
/
tasks.robot
57 lines (48 loc) · 1.92 KB
/
tasks.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
*** Settings ***
Documentation Insert the sales data for the week and export it as a PDF.
Library RPA.Browser.Selenium auto_close=${FALSE}
Library RPA.Excel.Files
Library RPA.HTTP
Library RPA.PDF
*** Tasks ***
Insert the sales data for the week and export it as a PDF
Open the intranet website
Log in
Download the Excel file
Fill the form using the data from the Excel file
Collect the results
Export the table as a PDF
[Teardown] Log out and close the browser
*** Keywords ***
Open the intranet website
Open Available Browser https://robotsparebinindustries.com/
Log in
Input Text username maria
Input Password password thoushallnotpass
Submit Form
Wait Until Page Contains Element id:sales-form
Download the Excel file
Download https://robotsparebinindustries.com/SalesData.xlsx overwrite=True
Fill and submit the form for one person
[Arguments] ${sales_rep}
Input Text firstname ${sales_rep}[First Name]
Input Text lastname ${sales_rep}[Last Name]
Input Text salesresult ${sales_rep}[Sales]
Select From List By Value salestarget ${sales_rep}[Sales Target]
Click Button Submit
Fill the form using the data from the Excel file
Open Workbook SalesData.xlsx
${sales_reps}= Read Worksheet As Table header=True
Close Workbook
FOR ${sales_rep} IN @{sales_reps}
Fill and submit the form for one person ${sales_rep}
END
Collect the results
Screenshot css:div.sales-summary ${OUTPUT_DIR}${/}sales_summary.png
Export the table as a PDF
Wait Until Element Is Visible id:sales-results
${sales_results_html}= Get Element Attribute id:sales-results outerHTML
Html To Pdf ${sales_results_html} ${OUTPUT_DIR}${/}sales_results.pdf
Log out and close the browser
Click Button Log out
Close Browser