Beginning with Selenium 3.0 Automation – Part II (Basics of Selenium)
Now that you are conversant with the general idea about automation and have already decided to make the grade in carrying out an automation test, we will discuss the most preferred and used OpenSource automation testing tool – Selenium.
What is Selenium?
- Selenium is a robust set of tools that supports rapid development of test automation for web-based applications.
- Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application.
- Selenium operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.
What are the features of Selenium?
- Supports Cross Browser Testing. The Selenium tests can be run on multiple browsers.
This can be achieved – By using various browser drivers.
- Allows scripting in several languages like Java, C#, PHP and Python.
It actually helps us, because it enables us to do scripting in the language we are comfortable with.
- Selenium WebDriver came into the market with its initial release of Selenium 2.0; which was later improved and updated to Selenium 3.0 (which we are currently using).
- What has changed from Selenium 2.0 to Selenium 3.0?
Selenium 2.0 supports Firefox browser only until version 47.0.1 and was supported by its own FireFox driver.
Selenium 3.0 supports FireFox browser by a driver “geckodriver”.
- What is geckodriver?
A webbased firefox driver based on the evolving W3C Webdriver specifications and uses the appropriate protocol which may change without any notice.
Example. Recent Selenium 3.0 does not support Firefox 53 version and instead works well only with 52 version. It will happen so until a new geckodriver is released to support version 53. Just look out for a compatible version of the geckodriver with every new major release of Selenium. (in case your current baselined script is not working or has ceased to work).
The above is only cited as a example to let you know the dependencies so that you know what to look for and how to keep your Selenium script working throughout.
What to ensure when you begin with Selenium?
- Before you begin with Selenium 3.0 automation, you need to keep few things in mind.
- Ensure that you have the right Firefox browser and the right complementary driver.
- Most of the times, ChromeDriver has been shown to give deviations, hence less used.
- IE driver does not support all web-based applications. It would be better to evaluation and check it yourself before using the IE driver.