Introduction to Selenium
Selenium is a web automation framework or collection of open source APIs which are used to automate the web application. On the other hand Selenium is designed in a way to support automation testing of web-based applications and a wide range of browsers. Due to its open source nature, it has become one of the most accepted tools amongst the testing professionals.
The name Selenium comes from a joke made by Huggins in an email, mocking a competitor named Mercury, saying that you can cure mercury poisoning by taking selenium supplements. The others that received the email took the name and ran with it.
- It supports many browsers such as Firefox, Chrome, IE, and Safari. Web Driver also supports different programming languages such as C#, Java, Perl, PHP , Python and Ruby.
- Selenium Webdriver is platform-independent as the same code can be used on different Operating Systems.
- Selenium WebDriver does not handle window component, but this limitation can be overcome by using external tools such as AUTO IT tool, Sikuli etc.
- It has good support for dynamic web pages like Ajax.
- Reusability of code. Create one time and execute multiple times with less or no maintenance.
- Selenium is easy for compatibility testing. It enables parallel execution in the combination of different OS and browser environments.
- Automated testing is more powerful and versatile. Automation tools allow us to integrate with Cross Browser Testing Tools, Jenkins, Github etc.,
- Support excellent reporting features. It generates automatic reports after test execution.
- Minimal manual intervention. Test scripts can be run unattended.
- Using Selenium WebDriver we can also perform API testing, Database testing etc.
1. Selenium IDE(Integrated Development Environment)
Selenium IDE is a record and playback tool. It is implemented as a Firefox Add-On and as a Chrome Extension. It and allows for recording, editing, and debugging of functional tests. It was previously known as Selenium Recorder.
2. Selenium Remote Control (RC)
Selenium RC is a server that allows a user to create test scripts in the desired programming language. It also allows executing test scripts within the large spectrum of browsers.
3. Selenium WebDriver
WebDriver is a different tool altogether that has various advantages over Selenium RC. WebDriver directly communicates with the web browser and uses its native compatibility to automate.
4. Selenium Grid
Selenium Grid is used to distribute your test execution on multiple platforms and environments concurrently.
Advantages of Selenium:
- It is an open source.
- It supports the distributed testing.
- It has a large user base and support community
- It has wide platform compatibility for ex. Windows, Mac OS, and Linux, etc.
- It has cross-browser compatibility for ex. Internet Explorer, Chrome, Firefox, Safari, etc.
- It supports multiple programming languages for ex. Java, C#, Ruby, Perl, Python, etc.
Disadvantages of Selenium:
- Selenium supports testing of only web-based applications.
- Mobile applications cannot be tested using Selenium
- Captcha and Barcode readers cannot be automated or tested using Selenium
- Reporting functionality can only be generated using third-party tools like TestNG or JUnit.
- As Selenium is a free tool, so there is no vendor support through the user can find numerous helping communities.
- The user is expected to possess prior programming language knowledge.