Selenium WebDriver Interview Questions — part 1
--
Question
Why should a company implement test automation at all?
Answer
Most companies are interested these days in fast and better development, fast and better deployment and fast and better testing.
They would like to have not one application build per week but 10 per day.
It is obviously very hard to deploy and test 10 builds per day.
Unless the deployment and testing are done automatically in a continuous integration and deployment environment with a system like Jenkins and Teamcity.
The main benefit of test automation is that it allows implementing CI/CD processes in the project.
The second benefit is to automate the test cases that are executed over and over again. I am referring to the regression testing ones.
By automating these test cases and running them unattended, the testers will have more time for more creative, exploratory, edge-case testing.
They will also have more time for other types of testing such as whitebox testing, api testing. And they will have more time for improving their skills.
The third benefit is that, by adding test automation to CI/CD processes, the feedback for developers regarding regression issues is very fast.
After a new build is deployed, automated tests run and if there are any issues, the development team is notified right away.
Question
Describe page object model.
Answer
When writing automation code, it is incorrect to have all code in the test script. This leads to very long test scripts which are difficult to read and maintain.
If you have WebDriver APIs in your test methods, You’re Doing It Wrong.
Simon Stewart
Page Object Model explains the rules for making the automation code easier to maintain:
1. Create a page class for each page of the site
The purpose of the page class is to wrap an HTML page, or fragment, with an application-specific API, allowing you to manipulate page elements without digging…