Professional Documents
Culture Documents
Web action group is intended for automating browser actions, such as open website in browser, get value and set value of a web element (text input,
dropdown). These actions are NOT automatically recorded when you work in browser during recording process.
stability – system actions are more reliable and quicker than image-based ones;
less actions needed
open website: click browser icon or start menu click on address line type website URL hit Enter
get web element value: find element by image select text by double-click or drag copy to clipboard set clipboard to variable
launch options – you can set browser type, private mode, element locator (XPath), etc.
readability – even new users will understand the action flow at first glance.
Open Website
Web Element
Get Value
Set Value
Switch to Browser
How to Get Element XPath
How to Do Table Scraping
Selecting table text using mouse
Selecting table text using Plugins
Open Website
This action launches one of the RPA Express portable browsers (located in RPAExpress\Applications folder) or Internet Explorer and opens a specified
website.
The Open Website action can contain other actions (Web Element, Mouse, Keyboard actions, etc.) as its children – just drag them onto the Open
Website action.
Parameters:
Site URL – the address of the website that will be opened. If the URL is not valid, the browser will perform a search using the default search engine.
Attention
The URL in the Recorder variable should be defined as:
http://www.site_address
or
https://www.site_address
In this way you have a lot of options to create a URL using Text Actions (for example Join), Loops, Clipboard and other actions.
With the Open Website action you can use the Mouse Click by XPath action. Refer to the Mouse Actions section for more details.
Web Element
This action is intended to get/set a web element value (text input, dropdown, label, etc.). Bot searches a web element by its unique locator called XPath
which is more reliable than image in most cases.
Get Value
This action performs the following: find element by XPath select element text set this text to a variable.
Parameters:
Get value / Set value – choose whether to read a value from a text field/checkbox/other element on a page, or write a value to an element on a page.
XPath of the element – indicate the element by specifying its unique locator called XPath. See the How to get XPath section.
Search in iframe(s) – use the option, if the element you need to get data from is located in an iframe (or iframes) as shown on the image below:
Note
The iframe containing the web element can be enclosed in another iframe. In this case you should define each iframe separately.
For this purpose click Add and define the iframe, which holds the iframe with the web element.
When defining the iframes you should keep the following order:
Use element attribute – define an attribute of the web element to be searched by Xpath, for example href, class, id, src.
Example
In the example we will collect all links from a div element located in an iframe.
Open https://www.w3schools.com/html/html_iframe.asp with Open Website and add Web Element to choose the elements required
1. In XPath of the element define XPath to the elements (links) for extraction (defined as a Recorder variable ${linksinframe} whose
value is //div[contains(@class, 'w3-col l10 m12')]//a).
2. Select the Search in iframe(-s) option. Define the iframe, where the div element is located. In the XPath of parent iframe(-s) field define
the target iframe (defined as ${iframe} whose value is //iframe[contains(@height, '310px')]).
3. Define the element attribute to narrow the search. Select the Use element attribute option and define the attribute (defined as ${attr}
whose value is href).
4. Select a variable to save the output (defined as linksres of List type as there can be a number of links in the div, that match the defined
criteria).
Save value to variable – the value of the indicated element will be saved to this variable.
Get a single element, when you define the XPath explicitly and save the result to a String or Number variable.
Example
1. Open www.sec.gov with Open Website
2. Put //*[@id="header-nav"]/li[1]/a in XPath of the element to define the element for extraction explicitly (the first item from the
list).
3. Save value to a String or Number variable.
4. Play the recording.
5. Check the value in the output. Result - ABOUT. The single element has been extracted by XPath.
Get a list of elements, containing under a single XPath and save the result to a List variable.
Example
1. Open www.sec.gov with Open Website
2. Put //*[@id="header-nav"]/li/a in XPath of the element to extract all elements by XPath (all items from the list).
3. Save value to a List variable.
4. Play the recording.
5. Check the value in the output. Result -
"[""ABOUT"",""DIVISIONS"",""ENFORCEMENT"",""REGULATION"",""EDUCATION"",""FILINGS"",""NEWS""]". A collection of elements
has been extracted by XPath.
Set Value
This action performs the following: find element by XPath get text from recorder variable set this text to the web element.
Parameters:
Use value from variable – the value of the indicated element will be set from the value of this variable.
XPath of the element – indicate the element by specifying its unique locator called XPath. See the How to get XPath section.
Search in iframe(s) – use the option in the same way as described for Get Value.
Switch to Browser
This action activates the browser window (either one of the RPA Express portable browsers or Internet Explorer) previously launched with the Open Website
action. The action has not got any Action specific parameters.
How to Get Element XPath
Disadvantages
Cannot select separate column(s)
Hard to set selection when table text changes (need to set anchor images for top-left and bottom-right table corners)
5. Right click and select the Table2Clipboard > Copy selected cells / whole table from the context menu.
6. (optional) When editing the recording, you can set clipboard content to a variable.