Selenium Testing | What is Selenium | Selenium Tutorial

Selenium Testing is an important step for testers who want to step in the world of automation. Generally, the first question is What is Selenium? Selenium is a suite of tools to automate web browsers across many platforms. This is the official definition of Selenium and in this article, I will explain what is selenium, selenium testing, and selenium history. I hope you will enjoy reading one of the most important test automation solution – Selenium’s historical improvements. But, first I want to start with the basics. Why do we do automation? Why do we need this?

Why Should We Learn Test Automation?

  • Automated tests are a great helper for the repetitive test tasks such as regression tests, and checklists.
  • Automated tests will reduce the cumbersome test costs and diminish the regression test execution time.
  • Automated tests will allow you to run tests in parallel and it reduces test execution time dramatically.
  • Automated tests can run at any time and periodically with an integrated CI tool. (weekends, holidays, etc.)
  • Automated testing, will increase the tester’s motivation. Testers learn new tools, techniques, languages…
  • Automated testing, will increase productivity and helps both testers and developers.
  • And engineer automates the repetitive processes. ;)
  • And so on…

Advantages of Selenium Webdriver

  • Selenium is one of the most common test automation frameworks that many organizations are using today to automate their web applications, and also mobile apps by combining it with Appium.
  • Learning selenium will open new doors and opportunities for testers both locally and internationally.
  • Selenium supports test executions while the browser window is minimized or with a headless browser.
  • Selenium Webdriver supports almost all major programming languages (JAVA, Python, Perl, Ruby, C# Etc.)
  • There is a huge community that shares knowledge with a variety of Best practices, Articles, and Tutorials on Selenium.
  • Selenium is easy to install and configure.
  • Selenium allows you to run your test in parallel.
  • Selenium supports different operating systems Windows, MacOS, Linux, etc.
  • It is OPEN-SOURCE.
  • Selenium Webdriver supports cross-browser testing. (Chrome, IE, Firefox, Etc.)
  • And so on…

What is Selenium?

The simple answer of What is Selenium question is: “Selenium is a free (open source) automated testing suite for web applications across different browsers and platforms.”

It has four main projects:

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

Selenium Testing History

Selenium was created by Jason Huggins in 2004. He was an engineer at ThoughtWorks and he was working on a web application that required a lot of testing periodically.

He had realized that the periodic manual testing effort of their application was becoming a burden and then, he wrote a JavaScript code that automatically controls the browser. He gave a name to that program and it is called as JavaScriptTestRunner. Then, he open-sourced this solution to the world and later he called Selenium Core.

In those days the other famous testing framework was developed by the Company called Mercury Interactive. This was the company which originally created QTP before it was acquired by HP and in our time that framework is called as HP-UFT (Unified Functional Testing). So, Jason Huggins created another test automation framework and he was thinking about its name and he came up an idea related to Mercury. As we all know that Selenium is a well-known antidote for Mercury Poisoning. Thus, he wanted to give a name to his framework as Selenium.

selenium tutorial

Selenium outweighs UFT in the following areas:

  • Cost (Selenium is completely free)
  • Flexibility (Selenium supports multiple programming languages, browsers, and platforms.)

Same Origin Policy Issue

Same Origin Policy says that you have to access the elements of a domain by Javascript code where the Javascript code was launched. For example, if you want to access test.swtestacedemy.com web elements with swtestacademy.js program, the program must be opened the swtestacaedemy’s test environment. It can not reach the elements of production because they are at different domains. So, if you want to use Selenium Core javascript program to automate your project, Selenium Core Javascript program and your web application under test must be in the same domain. Thus, you have to install local copies of Selenium Core and the Application to the same domain and it is a significant burden for testers.

selenium testing

What is Selenium RC (Selenium Remote Control)

Downloading and installing the whole application and the web server on local computers was a serious problem for testers who used selenium core. In order to eliminate this problem, another ThoughtWork’s employee Paul Hammant came up a great trick. He created a server that worked as an HTTP proxy. In this way, Selenium Core and the web application under test communicates through that server and they think that they are in the same domain. This solution is called as Selenium Remote Control or Selenium RC. Also, we can call this version as Selenium 1.0.  Selenium RC is also the first web test automation tool that allowed users to use different programming languages such as JAVA, C#, PHP, Python, Perl, Ruby.

what is selenium

Selenium RC Flow

  • You first need to launch Selenium Remote Control (RC) Server before you can start testing.
  • The Selenium RC Server communication channel between your Selenium commands and your browser.
  • When you begin testing, Selenium RC Server “injects” a Javascript program – Selenium Core into the browser.
  • Once Selenium Core is injected, it will start receiving instructions coming from RC Server.
  • When the instructions are received, Selenium Core will execute them as Javascript commands.
  • The browser will execute the instructions of Selenium Core and will return the responses to the RC Server.
  • The RC Server will receive the responses of the browser and then display the results to you.
  • RC Server will fetch the next instruction from your test script to repeat the whole cycle.

selenium rc

What is Selenium Grid

The creator of Selenium Grid is Partick Lightbody. He created Selenium Grid to minimize test execution times. First, he called this solution as Hosted QA and it was sending Selenium instructions to several nodes simultaneously. Selenium Grid works like hub-node concept and the hub works as a central communication point of all connected nodes. In this way, we can run our test in parallel on multiple browsers and environments.

selenium grid

selenium history

What is Selenium IDE

Selenium IDE is a record and play solution for Firefox. It is an extension which was developed by Shinya Kasatani in 2006. You can start recording, do the actions on Firefox and then stop your recording. Then, you can run your recording to automate your actions on Firefox. Unfortunately, Selenium IDE development finished. One of the similar tools is developed by Katalon and it is called as Katalon Recorder for Chrome.

selenium ide

What is Selenium Webdriver

In 2006 Simon Stewart created WebDriver (Selenium 2.0) project. It was a cross-platform testing solution which controls the browser from Operation System level with browser drivers. He also presented Selenium Webdriver at Google Automation Conference 2007. In the same conference, Cedric Beust also presented TestNG. What a conference! :)

WebDriver manipulates page elements in a more realistic way. For example, if you have a disabled text box on a website, WebDriver cannot enter any text in it. It acts like a human and it is faster than Selenium RC. The recent version of Selenium Webdriver is called as Selenium 3.0. In Selenium 3.0, there are some architectural changes were done. Webdriver is W3C Candidate Recommendation on 30 March 2017. You can find its details here.

This is the brief history of Selenium Project. I hope you enjoyed selenium testing article. Happy automating!

[fusion_widget_area name=”avada-custom-sidebar-seleniumwidget” title_size=”” title_color=”” background_color=”” padding_top=”” padding_right=”” padding_bottom=”” padding_left=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=””][/fusion_widget_area]

Thanks.
-Onur

3 thoughts on “Selenium Testing | What is Selenium | Selenium Tutorial”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.