Element Exist - Example

Use Case

The following activity illustrates on how we are going to find an element in the
https://www.sutherlandglobal.com/ webpage. The element that we are going
to find in this webpage is "Business Process". Using this element, we are going
the validate and decide what happens if it's true and false.
To validate and decide we are using Flow Decision activity.

Steps to execute a bot

Here we are going to automate and verify whether the element exists in the
webpage. It presents activities such as Element exist activity, Click event,
OpenWebBrowser, and Flow Decision.

To build the automation process,

1.    Open a project and create a workflow.

2.    Drag and drop the Element exist activity to the workflow.

3.    Double click on the activity and click on select element.

4.    Navigate to the browser page and select the value using the Robility
Automation.

5.     Next, we need to create a variable from the output section. Declare a
variable in the Exist status section by pressing CTLR+Q.

 

7.    To validate and proceed further, you must select “True” in the Skip on
Error if you are using the flow decision activity.

8.     Drag and drop the Flow decision from the Primitives feature and connect
below the Element exist.

9.     Enter the Element exist variable as ("ExSt") in the decision box as input
condition.

10.  Add click event activity for True condition and select the element using
Robility Automation.

11.  Add OpenWebBrowser activity for False condition if the element does not exist.

12.  Double click on activity and enter the URL “ https://www.sutherlandglobal.com/

13.  Next add click event activity to click on the value and connect it below Open Web
Browser activity.

14.  Select the element as indicated in the following GIF.

 Your workflow must present like the following image.

The bot will automate and verify if the element exists in the webpage, if it exists it would
select the element. If it doesn’t exist, it would open the browser and select the element.