Introduction to Selenium WebDriver and Comparison with Selenium RC

Sometimes you may heard the term Selenium Webdriver is tool or framework etc. But in simple term , we can say WebDriver is  nothing but an interface. Selenium WebDriver ,also known as Selenium 2.0 has been designed to overcome of the limitation of Selenium RC or Selenium 1.0.

What is Selenium RC?

Selenium RC or Selenium 1.0 was introduced before WebDriver. It required to start selenium server which used to set up a communication between the selenium client libraries and the browser.Server used to pass the selenium command to the browser. Then browser used to execute those selenium command by using its java script interpreter. There were some limitations when we needed to handle file upload, pop-ups handling,dialog etc.

WebDriver has been combined with Selenium 1.0 to become Selenium 2.0. It has been developed to overcome the limitation of Selenium 1.0.

Selenium 1.0 + WebDriver = Selenium 2.0


 

Difference between WebDriver and Selenium RC:

Selenium WebDriver:

  1. Selenium WebDriver do not need Selenium server to execute tests.
  2. Selenium WebDriver is simpler and having more concise programming interface.
  3. WebDriver directly interacts with the Browser itself.
  4. It supports almost all the latest version of different browsers.
  5. WebDriver supports Web Applications as well as mobile applications.
  6. WebDriver provides a better support to execute Ajax applications (In ajax, element of the webpage will be loaded without browser loading or refresh).
Selenium WebDriver

Interaction between WebDriver and browser

Selenium RC:

  1. Selenium RC required Selenium server to executes the tests.
  2. Selenium Server used to serve as a middle man between browser and client libraries.
  3. There were some limitation when needed to work with dialog,pop-ups etc.
  4. Selenium supports only web Applications.
  5. Supported all browsers but not the latest versions.
  6. It used to inject selenium core into browser to pass the java script commands to the browser.
  7. It is not being used now as WebDriver has come. But still some maintenance projects are supported by this.
Selenium RC

Selenium server sets communication between browser and client lib

 


 

More details about selenium WebDriver:

Selenium WebDriver can be implemented by many classes which simplifies the code to write for automation. Selenium jars files can be configured with any desired IDE like IntelliJ IDEA or Eclipse.If a person knows core java , he/she should be able to start writing code using Selenium WebDriver.

It provides synchronization during script, handle native event on browsers. This is the main interface used for testing, having following implementing classes.

  1. ChromeDriver
  2. EventFiringWebDriver
  3. AndroidDriver
  4. AndroidWebDriver
  5. FirefoxDriver
  6. HtmlUnitDriver
  7. InternetExplorerDriver
  8. IPhoneDriver
  9. IPhoneSimulatorDriver
  10. RemoteWebDriver
  11. SafariDriver

Ask Question
Have any question or suggestion for us?Please feel free to post in  Q&A Forum

 

Object identification using CSS selectors in Selenium
Working with different browsers in selenium
Shekhar Sharma

Shekhar Sharma

Shekhar Sharma is founder of testingpool.com. He is an automation engineer having more than 8 years of experience who loves troubleshooting in automation and finding innovative ways to solve the problems. His other leisurely activities includes playing harmonica, paintings, sketching portrait, watching movies and travelling etc.

You may also like...

1 Response

  1. August 16, 2015

    […] the previous post, we have seen about Selenium WebDriver and its comparison with Selenium RC. In this post, we will see how to open different browsers with […]

Leave a Reply

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