INTRODUCTION TO SELENIUM
what is selenium?
selenium is open source tool used for automating the web applications.
Selenium is a free (open-source) automated testing framework used to validate web applications across different browsers and platforms. You can use multiple programming languages like Java, C#, Python, etc to create Selenium Test Scripts. Testing done using the Selenium testing tool is usually referred to as Selenium Testing.
Selenium Tool Suite
Selenium Software is not just a single tool but a suite of software, each piece catering to different Selenium QA testing needs of an organization. Here is the list of tools
1. Selenium Integrated Development Environment (IDE)
2. Selenium Remote Control (RC)
4. Selenium Grid
Who developed Selenium?
Since Selenium is a collection of different tools, it also had different developers. Below are the key persons who made notable contributions to the Selenium Project
Introduction to Selenium
Seeing potential in this idea to help automate other web applications, he made Java Script Runner open-source, which was later re-named Selenium Core.
Birth of Selenium Remote Control (Selenium RC)
Introduction to Selenium
Unfortunately; testers using Selenium Core had to install the whole application under test and the web server on their own local computers because of the restrictions imposed by the same origin policy. So another Thought Work’s engineer, Paul Hammant , decided to create a server that will act as an HTTP proxy to “trick” the browser into believing that Selenium Core and the web application being tested come from the same domain. This system became known as the Selenium Remote Control or Selenium.
Birth of Selenium Grid
Introduction to Selenium
Selenium Grid was developed by Patrick Lightbody to address the need of minimizing test execution times as much as possible. He initially called the system “Hosted QA.” It was capable of capturing browser screenshots during significant stages, and also of sending out Selenium commands to different machines simultaneously.
Birth of Selenium IDE
Shinya Kasatani of Japan created Selenium IDE, a Firefox and Chrome extension that can automate the browser through a record-and-playback feature. He came up with this idea to further increase the speed in creating test cases. He donated Selenium IDE to the Selenium Project in 2006.
Birth of WebDriver
Why the Name Selenium?
the Name Selenium came from a joke that Jason cracked once to his team. During Selenium’s development, another automated testing framework was popular made by the company called Mercury Interactive (yes, the company who originally made QTP before it was acquired by HP). Since Selenium is a well-known antidote for Mercury poisoning, Jason suggested that name and his teammates took it. So that is how we got to call this framework up to the present.
What is Selenium IDE?
Selenium Integrated Development Environment (IDE) is the simplest framework in the Selenium suite and is the easiest one to learn. It is a Chrome and Firefox plugin that you can install as easily as you can with other plugins. However, because of its simplicity, Selenium IDE should only be used as a prototyping tool. If you want to create more advanced test cases, you will need to use either Selenium RC or WebDriver.
What is Selenium Remote Control (Selenium RC)?
Selenium RC was the flagship testing framework of the whole Selenium project for a long time. This is the first automated web testing tool that allows users to use a programming language they prefer. As of version 2.25.0, RC can support the following programming languages.
What is Selenium Webdriver?
Selenium Webdriver is an open-source collection of APIs which is used for testing web applications. The Selenium Webdriver tool is used for automating web application testing to verify that it works as expected or not. It mainly supports browsers like Firefox, Chrome, Safari and Internet Explorer. It also permits you to execute cross-browser testing.
WebDriver also enables you to use a programming language in creating your test scripts (not possible in Selenium IDE).
You can now use conditional operations like if-then-else or switch-case. You can also perform looping like do-while.
Following programming languages are supported by WebDriver
Architecture of Selenium Webdriver
Selenium WebDriver architecture comprises following components;.
It controls the browser from the OS level
All you need are your programming language’s IDE (which contains your Selenium commands) and a browser.
What is Selenium Grid?
Selenium Grid is a tool used together with Selenium RC to run parallel tests across different machines and different browsers all at the same time. Parallel execution means running multiple tests at once.
Enables simultaneous running of tests in multiple browsers and environments.
Saves time enormously.
Utilizes the hub-and-nodes concept. The hub acts as a central source of Selenium commands to each node connected to it.
WebDriver interacts with page elements in a more realistic way. For example, if you have a disabled text box on a page you were testing, WebDriver really cannot enter any value in it just as how a real person cannot.