Categories
Uncategorized

What is Selenium WebDriver?

If you are interested in browser automation or web application testing you may have already heard of Selenium. Since there is a lot of terminology related to this framework, it is easy for you to get lost, especially if you come to Selenium for the first time. In this article I want to save your day by providing a short and clear explanation of what is what in the Selenium project.

What is Selenium?

Selenium is a web application testing framework that allows you to write tests in many programming languages like  Java, C#, Groovy, Perl, PHP, Python and Ruby. Selenium deploys on Windows, Linux, and MAC OS.

It is an open-source project, released under the Apache 2.0 license, so you can download and use it without charge.

Terminology

  • Selenium Core (aka Core) is a set of JavaScript scripts that control the browser, imitating user activity. These scripts are injected into the web page and executed according to a list of actions written in a special HTML-table-based command language (aka  Selense), thus simulating user activity.
  • Selenium RC (aka Selenium Remote Control or Selenium 1) receives Selenium Core commands via HTTP and executes them on a remote machine, proxying the web browser in order to avoid the “same host origin” restriction. This also allows writing the tests in other languages like C#, Python, Perl, PHP, Java and Ruby (via language bindings for Selenium Core).
  • Selenium-WebDriver (aka WebDriver or Selenium 2) is a successor of Selenium RC. It does the same job, but in a different way: instead of injecting a JavaScript code into the browser to simulate user actions, it uses the browser’s native support for automation (different for each browser). Also, instead of a dictionary-based API (used in Selenium RC), it offers the more convenient object-oriented API.
  • Selenium Server allows using Selenium-WebDriver on a remote machine.
  • Selenium IDE is a Firefox add-on that records user activity and creates a test case based on it. It can also play the tests back and save them as a program in different languages.
  • Selenium-Grid allows you run the tests on different machines against different browsers in parallel; in other words it enables distributed test execution.
  • Selenese is a special “language” represented by a set of Selenium commands that run your tests. A sequence of these commands is called a test script.

Where to start?

It’s good to start with Selenium IDE. It will help you to become more familiar with Selenium commands, and you can see how Selenium works by running the test scripts right from this tool. Note, however, that when you run your test scripts from Selenium IDE, they are executed in a different way than when you run them through other Selenium tools. If you need to test your application, you’d better use Selenium WebDriver or Selenium RC. I put Selenium WebDriver first, because it is the successor of Selenium RC which  has been officially deprecated.

You can download everything at http://docs.seleniumhq.org/download/.

A bit of history

2004 –  Jason Huggins creates a JavaScript based tool for automatic testing called Selenium (now it is known as Selenium Core). Later Selenium Remote Control (aka Selenium RC) was developed to address the “same host origin” browser policy and allow many language bindings to control the browser at a distance

2006 –  Simon Stewart started working on another web testing tool called WebDriver

2009 –  Selenium RC and WebDriver are merged into a one project called Selenium-WebDriver (aka Selenium 2.0)

2013 –  The first working draft of WebDriver API W3C Specification is released

5 replies on “What is Selenium WebDriver?”

It was nice to read your post.If you want to create robust, browser-based regression automation scale and distribute else scripts across many environments then you want to use Selenium WebDriver which is a collection of language specific bindings to drive a browser

Hi, Very Nice article. But when I try this on Bamboo, It gives me an error. But when I try the test locally it works fine. I will post the error here, Can you provide some help

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

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