How Automated Testing Tools Work

Last updated on - March 26th, 2018

Specialised automated tools are here to make our lives easier so that we can automate testing activities and save our time, efforts, and money. Let’s throw some light and understand how automated testing tools work and automate our applications.

Any automation tool can automate the application, only if it identifies application controls or elements like button, link, text etc uniquely. On the contrary, you cannot automate your applications if automation tool does not identify application controls.

Each tool available in the market has its own way to identify the page controls. However, all the tools have the same working mechanism.

How automation tool treats and identifies the page controls are very important factors. In this article, we will discuss the same.

Let’s examine how these tools work internally and its other related factors.

Code Behind The Scene

In a digital world, all the applications you see or deal with, there is a programming code and logic written behind the scene. Code behind the scene plays a vital role in the working mechanism of any automation tools.

Each page of your application contains multiple controls or elements. Whatever you see in your application is UI object or UI control or elements and each element has its own properties like name, value, ID, text etc.

These properties are responsible for element’s look & feel and its behavior on the page.

During the application development phase, developers define these properties. They can change or customize these properties as per the requirement.

Must Read :

Example

To understand this practically let’s take an example of one web application. If you open google search page, you will see multiple elements like a search box, search button, different links etc as shown in below image

google search page

Press F12 in the keyboard to explore the DOM and examine the properties of the elements defined by the developers.

Document Object Model (DOM) represents HTML code behind the page. It defines the logical structure of documents and the way a document is accessed and manipulated. You can get more details about DOM here.

Google search button has different properties like value, name, and type as you can see in below DOM image.

google search button properties

If you change these properties value, search button on the page will also change accordingly. During the automation, you can use any unique property to identify the search button.

What It Does Under The Hood

As stated above, to automate any application, it is necessary that automation tool identifies application controls uniquely.

Under the hood, either you or automation tool needs to explore the DOM to find unique properties of elements and store it in repository or file to use it at the later stage.

If you are using record and play feature of automation tool, then during the recording, automation tool explores the DOM and select the unique properties of the element and store it somewhere.

When you play the recording, automation tool uses the stored unique properties to identify the elements on the page and perform the required actions on it.

If you are writing automation code manually, you must select elements properties which can be utilized by the automation tool to identify the element uniquely.

In future, if developer change element properties due to any reasons, you also need to make sure to update the same element with new identification properties.

Must Read :

‘Where’ and ‘What’ Concept

Each tool available in the market has its own way to identify and store identification properties of the page elements.

However, working mechanism of all the automation tools are almost same and technically they work based on two important parts: Where and What.

Where – Address of Element on The Page

Where‘ part is mandatory for automation tool to automate your application. In this part, you tell to automation tool which element you want to automate.

Here, you identify elements properties and store it in the defined format so that automation tool can use it to identify the required element on the page.

What – Action Need to Perform on The Element

What‘ part is the second part where you mention about the action needs to be performed on the identified element during ‘Where’ part.

For example, click, set, select, clear etc. These are the actions that you can perform on identified elements.

Each line of your automation script code will contain ‘Where‘ part and ‘What‘ part. In below image, you can see ‘Where’ and ‘What’ part for both Selenium and Unified functional testing (UFT).

Selenium Code:

How Automated Testing Tools Work

UFT Code:

Where and what part in UFT code

I hope this article helped you to understand how automated testing tools work. You can also check other related articles.

Let me know if you have any questions, by commenting below or send an email directly to me at sureshdubey24jun@gmail.com

If you like this post you can help others by sharing it with your friends and loved one using below links.

For Further Reading :

About Suresh Dubey

I am Suresh Dubey working as an automation test engineer. I am passionate about playing with automation testing and tools. I got a chance to work on Selenium, UFT, PowerShell, Jenkins, CI-CD, Maven, Cucumber, Git etc. I believe in 'Knowledge Sharing'. My mantra for success is 'Learn Something New Everyday'.

View all posts by Suresh Dubey →

2 Comments on “How Automated Testing Tools Work”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.