Table of Contents
- 1 What is Selenium?
- 2 Selenium Components
- 3 Selenium IDE
- 4 Selenium RC
- 5 Selenium WebDriver
- 6 Selenium Grid
- 7 Platforms supported by Selenium
- 8 Advantages of Selenium
- 9 Disadvantages of Selenium
- 10 Advantages of Selenium over QTP
What is Selenium?
Selenium is a free Open source functional Testing tool used for testing web applications on multiple browsers and multiple operating systems (Platforms). It is used for Functional and Regression Testing. Testing done by the selenium tool is usually referred to as Selenium Testing.
Selenium is not just a single tool but is a combination of different suites of software. Selenium has four components.
- Selenium IDE (Integrated Development Environment)
- Selenium RC (Remote Control) – deprecated now
- Selenium WebDriver
- Selenium Grid
Selenium Integrated Development Environment (IDE) is the simplest framework in the Selenium suite. It is a browser plugin to record and playback the operations performed on the browser. Selenium IDE plugins are available for Chrome and Firefox browsers. It doesn’t support the programming features. Selenese is the language which is used to write test scripts in Selenium IDE.
Benefits of Selenium IDE
- Very use to use and install
- Has built-in test results reporting module
- No programming experience is required
- It is used to create and execute Test cases using Firefox or Chrome browsers
- The user can easily record the Test scripts
- The user can edit the Test scripts
- The user can create Test Suites.
Drawbacks of Selenium IDE
- It doesn’t support iteration statements
- No support for conditional statements
- It doesn’t support error handling
- It does not support Database testing
- Available only in Firefox and Chrome
- It doesn’t generate a detailed Test Reports summary.
Selenium RC is a testing tool used for web applications testing. It supports programming using RC. Using RC, we can test out applications in multiple browsers and also in multiple operating systems.
Selenium RC has complex architecture hence slow in automation test execution. In Selenium RC, we need to launch a separate application called Selenium RC Server before we can start testing. Selenium RC server acts as a middleman between selenium commands and your browser. Selenium RC has been officially deprecated, you should use WebDriver or IDE to test your web applications.
Selenium WebDriver is a web application testing tool introduced by eliminating the drawbacks of IDE and RC. It is simple in architecture and also easy to understand and use.
Selenium WebDriver Architecture
- It is a well-designed object-oriented API developed to automate web and mobile software applications testing process
- It is faster than Selenium RC
- Selenium WebDriver directly talks to the browser
- It’s API is more concise than Selenium RC
- It cannot readily support new browser, but RC can
- It doesn’t have a built-in command for automatic generation of test results
- It doesn’t support window base apps
- It needs outside support for report generation activity like dependence on TestNG or Jenkins.
Selenium Grid is used to run Automation tests on multiple browsers across multiple operating systems, machines simultaneously. It supports Parallel Testing. It is used only for Test Execution.
- Allows simultaneous running of tests in various web browsers, environments and machines
- Saves time enormously
- It speeds up the test suite completion time as it is capable of running various tests in parallel
- Perform cross browser testing.
When to use Selenium Grid
You should use Selenium Grid when you want to do either one or both of the following:
When you run your tests against various browsers, operating systems, and machines all at the same time. This will ensure that the application you are testing is fully compatible with a wide range of browser operating system combinations.
Save execution time of your test suites. If you set up Selenium Grid to run, say, 5 tests at a time, then you would be able to finish the whole suite around 5 times faster.
Platforms supported by Selenium
Selenium works with different Operating systems, browsers, programming languages and Testing Frameworks.
- Microsoft Windows
- Mozilla Firefox
- Google Chrome
- Internet Explorer
- Opera etc.
- C#.Net – NUnit
- Java – JUnit or TestNG
- Python – unittest, pyunit
- PHP – Behat + mink
Advantages of Selenium
- It is an Open Source Software, you can check out its source code from its GitHub Repository.
- It supports multiple Programming languages
- It supports multiple Operating systems
- It supports multiple browsers
- It supports parallel testing.
Disadvantages of Selenium
- It supports only web based applications and does not support windows based applications
- It is difficult to test Image related applications
- It does not support built-in Report facility
- It is difficult to use
- Newly added features may not work properly
- It does not support to test Captcha and Barcode readers
- No ready vendor technical support available from anybody
- Tester should have high programming language knowledge to write Selenium Automation Test Scripts.
Advantages of Selenium over QTP
Selenium and QTP, both of them are automation testing tools:
- Selenium is an open source tool while QTP is a commercial tool
- Selenium is used to test only web-based applications. However, QTP can be used to test a wide variety of applications like web-based and windows based applications
- Selenium supports scripting in multiple languages like Java, Python, .Net, Perl, Ruby, and PHP while in QTP only VB scripting is supported.