История страницы
...
- Drag the following actions to the workspace:
- «Open Browser», «Close Browser» from the «Browsers» action group;
- «Open», «Save», «Close» from the «Excel» action group;
- «For» from the «Basic Actions» group.
Example:
- Fill in the action parameters:
Action «Open Browser» Open Browser action - choose «Chrome» from the drop-down list of browsers, and in the «Address» field, specify the link to the «Supplier Portal» website and navigate to the procurement plans tab.
Example:
Action «Close Browser» Close Browser action - context browser.
Action «Open» Open action - in the «File Path» parameter, specify the path to the Excel file.
Actions «Save» «Save» and «Close» actions - in the «Context» parameter, specify the previously opened Excel file.
For action:
- «From» - 1;
- «To» - 5;
- «Increment» - 1.
- Analyze the XPath of the web element:
Compare the XPath of two consecutive procurement plans for customer information and write them to a text file. It can be observed that the only difference between them is one digit. - Create a variable with the String data type and the value will be the XPath of the customer, where the changing digit will be replaced with the word «Customer».
Example: - Fill the body of the loop with actions: «Convert Data» from the «Basic Actions» group, «Replace by Pattern» from the «Text» action group, «Get Text» from the «Browsers» action group, and «Set Cell Value» from the «Excel» action group.
Example: - Fill in the action parameters:
...
To create a web element, follow these steps:
Select «Add the Add New Resource» Resource as the method of filling the parameter.
Fill in the Display Name parameter (with the "Element") and Default Attribute parameter by choosing «XPath» from the drop-down list.
Click the «Save» button.
In the Replace by Pattern action specify:
Parameter «Text» Text parameter - the previously created variable «Customer XPath»;
Parameter «Pattern» Pattern parameter - the word «CUSTOMER» to be replaced;
Parameter «Substitution» Substitution parameter - the result of the action «Convert Data».
- In the «Set Set Cell Value» Value action, specify:
- Context parameter - the instance of the opened Excel file;
- Row of the cell Cell parameter - use the expression builder tool to fill this parameter;
- Value parameter - the result of the Get Text action
Start the robot.
The result of the robot’s work is a filled Excel file.