Summary -

In this topic, we described about the below sections -

Selenium Components

Selenium Software is a set of tools suite and each tool supports different testing needs of an organization. The major components of Selenium are -

  • Selenium Integrated Development Environment (IDE)
  • Selenium Remote Control (RC)
  • WebDriver
  • Selenium Grid
Components/Tools

Same Origin Policy

The same-origin policy (SOP) is a key concept in the web application security model. Under this policy, a web browser allows scripts on a first web page can access the data on second web page, if both web pages lies in the same origin. An origin is a combination of URI scheme, host name, and port number. If the webpages are on the different origin, it is not allowed to access the data from the different origin

For example, if any user logged into the tutorialscampus.com with username and password. The user still accesses any secured webpage without logging again. But the logging into tutorialscampus.com can’t access the secured pages from other domains like chrome.google.com/quick-compose-for-gmail, compose.mail.yahoo.com etc.

Selenium Remote Control (Selenium RC)

Selenium Core was the first version of the selenium development. However, the first version has a stopper that testers had to install both Selenium (a JavaScript program) and the webserver containing the web application on their local systems because of the restrictions imposed by the same origin policy.

So, Paul Hammant (another ThoughtWorks Engineer) has created a server that 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. The system became named as Selenium Remote Control or Selenium 1.

Selenium Remote Control is a two-component tool and those are -

  • Selenium RC Server
  • Selenium RC Client (Library has the programming language code)

RC supports the following programming languages - Java, C#, PHP, Python, Perl, Ruby.

Selenium IDE

Selenium IDE was initially created by Shinya Kasatani from Japan and contributed to the Selenium project in 2006. It is initially known as Selenium Recorder and later names as Selenium IDE.

Selenium IDE (Integrated Development Environment) is a tool that helps to develop Selenium test cases.

It’s an easy-to-use Chrome and Firefox extension with record-and-playback feature. This feature increases the speed in creating test cases. Scripts are recorded with Selenium IDE in a special test scripting language called Selenese for Selenium. Selenese comes up with commands for bringing out actions in a web browser and restoring data from the resulting pages.

The tests recorded via the plugin can exported to the programming languages like Java, Ruby, Python, etc.

Selenium Grid

Selenium Grid is a testing tool used to run automation tests across different browsers, operating systems, and machines. Selenium Grid was developed by Patrick Lightbody to address the requirement of minimizing automation test execution times as much as possible.

Selenium Grid initially called the system "Hosted QA" and later named as Selenium Grid. In the selenium Grid, one server acts a hub and the hub has a list of servers that provides access to browser instances. Other servers communicate to the hub to get access to browser instances.

Selenium Grid was capable of capturing browser screenshots during significant stages and also sending out Selenium commands to different machines simultaneously.

Selenium WebDriver

Simon Stewart (ThoughtWorks consultant) developed WebDriver in 2006. The selenium core has a stopper of running automation testing on cross-platform. Selenium WebDriver was the first cross-platform testing framework that control the browser from the OS level.

Selenium WebDriver is a successor to Selenium RC. Selenium WebDriver accepts commands (sent in Selenium or via a Client API) and sends them to a browser.

This is implemented through a browserspecific driver sends commands to a browser and retrieves the results. Each driver launches and accesses a browser application. Different WebDrivers are Firefox Driver (Gecko Driver), Chrome MicroEdge, Opera Driver,Safari Driver, HTML Unit Driver.

Selenium 2

Explorer Driver, The Selenium Team merged WebDriver and Selenium RC in 2008 to form a more powerful tool called Selenium 2. The remaining Selenium IDE and Selenium Grid are remaining unchanged. Selenium RC is still being d eveloped but only in maintenance mode.

Selenium 3

This is a dropin replacement for users of WebDriver API’s. The major change is, removing the core and replacing it with the back web consorti-- end WebDriver. Selenium 3.0 has become a W3C (world wide um) standard. Selenium 3 majorly being a choice of software testing tool for both web and mobile based applications.