Automation Testing Using Selenium

By Ysquare Posted December 8, 2021

 

What is the first thought that comes to our minds when we hear the term automation? Loss of jobs, Unemployment, Robots are going to control the world and a lot more of our vivid scientific movie imaginations. Before moving into the topic, let me narrate a small story, During the 1950s, there was a job which was popular all over the developed countries.

 

Every office, every law firm would have hundreds of people working on this position. An entire floor would also be dedicated to the people in this position. It was a good-paying job too. Their jobs revolved around stacks and stacks of paper and loads of ink and pens. Then one day, a machine was invented which would make the people working jobless overnight.

 

Then a new feature called Groups was implemented. Now again the testing team will test the new feature as well as the old features. Then privacy features, bulk send, status, and so many features were introduced one after another. Now, the same testing team will test the new features and would only randomly check the old features. Why? Why would the testing team instead of testing the entire application again only tests random previous functionalities? The reason is humans, in general, are lazy. As, testing the entire application, again and again, is mundane and tiresome. This would lead to failure of the application if some of the previously implemented functions are not working. This is where automation testing comes to the rescue. With automation testing, we can automate all the regression testing part i.e, the testing of older functionalities. The most popular tool in the field of automation testing is Selenium.

Selenium is popular because it is open source and has wide community support. How does Selenium work? Selenium is a library that replicates all the human interactions in a browser. And, yes it can only test applications that run on a web browser. What do we do when interacting with an application or software. We identify the specific target and perform some action on it. We identify a target/element visually by looking. Likewise, selenium identifies an element in a web browser via locators. Think of locators as identifiers. How do we identify a person? By name, gender, country, etc. Likewise, each element you see on a web page has an identity to it like id, name, xpath, etc. With the help of these locators, selenium identifies an element on a web page. After identifying an element selenium provides us with a variety of functions to perform some actions on the element just the way we do. Those actions include opening a website, giving inputs such as texts and images, clicking on a button and so on. With the help of automation, all the testing scenarios can be automated and every time a new feature or a build is released the automation script can be run be detect any bugs in the existing features. Automation testing saves a lot of time, manpower and helps in faster deployment of new features.

The latest fad in the testing community is Visual regression testing. With the help of Selenium, only the functional part of the application can be automated. But all applications are comprised of both functional and visual elements. Visual regression testing tests the Spacing, color, position of the elements on a web page and so on. A minute change in the position of an element will not be identifiable by a human eye. But, with the help of Visual regression testing, a small pixel change can be identified and fixed. It works by comparing a base image with the screen under test. The first time it runs, it takes the screenshot of the application screen and for subsequent runs, it will compare the application screen and base screen and lists out the differences. Thus automation helps in functional testing and visual testing of an application making the application error-free and increases the efficiency of the software.

  • Tags:

RELATED POSTS

WEB APPLICATION EXPLOITATION TECHNIQUES AND ITS COUNTER MEASURES

Web Applications are mainly used commercial transactions and sensitive data transfers nowadays. Most of the web application contains security vulnerabilities which enables attacker to exploit them.

One response to “AUTOMATION TESTING USING SELENIUM”

Leave a Reply

Your email address will not be published.

PREVIOUS POST
USER EXPERIENCE
NEXT POST
WEB APPLICATION EXPLOITATION TECHNIQUES AND ITS COUNTER MEASURES

Let’s collaborate!

Let us supercharge your business with bespoke solutions and products.

Close Bitnami banner
Bitnami