Web Automation - Simple example

ORQA has a powerful web automation capability. We will now demonstrate a simple web automation task of opening BBC News on a browser and opening the Economy news page.

Firstly, we must use the ‘Open Browser’ tool in the ‘Web Automation’ section and nominate a browser to be used:

Next, we need to define the URL:

From here, we must define the path to be taken to lead us to the Economy news page.

We can achieve this by running the test, then leaving the browser open and adding to our task. We will need to use the ‘Click in Browser’ operation:

The XPath is defined by clicking select next to the box, then clicking on the element on the webpage we wish to automate a click on.
E.g. we click select next to the XPath box then on the webpage we click ‘Business’, automating a click on the business section of BBC News.

We must now repeat this process, from the Business news page on BBC News we will now add a ‘Click in Browser’ for the Economy section.

Our task is now ready to run:

We could also use the ‘Set Text in Browser’ from the home screen of BBC News to type “Economy” in the search bar:

We set the XPath as the search bar.
No when running we get to the following screen:

Finally we must add a ‘Click in Browser’ to click the top result. To ensure we click the correct result, we can add the ‘Wait for Browser Element’ operation, selecting the result we wish to click on as the XPath:

This will force the task to wait until the top result appears before clicking, if after 30 seconds the result does not appear, the task will fail.

Running this test now will take us to the Economy page on BBC News.

NOTE: To speed up this process, we can use the record feature in ORQA - See Web Automation - Recording: