Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Selenium RC and WebDriver

What's the basic difference between Selenium RC and WebDriver?

like image 643
Muna Avatar asked Jul 18 '12 07:07

Muna


People also ask

What is main difference between RC and WebDriver?

WebDriver is faster than Selenium RC because of its simpler architecture. WebDriver directly talks to the browser while Selenium RC needs the help of the RC Server in order to do so. WebDriver's API is more concise than Selenium RC's. WebDriver can support HtmlUnit while Selenium RC cannot.

What is the difference between WebDriver and remote driver?

Selenium RemoteWebDriver : Difference between WebDriver and RemoteWebDriver. Selenium Webdriver is a tool used to execute automated test cases on various browsers. The object of the WebDriver is a browser. Selenium RemoteWebDriver implements the WebDriver interface to execute test cases.

Is Selenium and Selenium WebDriver same?

Selenium IDE and Selenium Webdriver are part of the same Selenium suite. The two tools offer solutions for testing web applications, UI design features, and other structural functions. However, the two products answer different testing needs.

What is Selenium RC used for?

Selenium RC is an important component in the Selenium test suite. It is a testing framework that enables a QA or a developer to write test cases in any programming language in order to automate UI tests for web applications against any HTTP website.


2 Answers

Quoting from WebDriver and Selenium RC:

Selenium-WebDriver makes direct calls to the browser using each browser’s native support for automation. How these direct calls are made, and the features they support depends on the browser you are using. Information on each ‘browser driver’ is provided later in this chapter.

For those familiar with Selenium-RC, this is quite different from what you are used to. Selenium-RC worked the same way for each supported browser. It ‘injected’ javascript functions into the browser when the browser was loaded and then used its javascript to drive the AUT within the browser. WebDriver does not use this technique. Again, it drives the browser directly using the browser’s built in support for automation.

You may, or may not, need the Selenium Server, depending on how you intend to use Selenium-WebDriver. If you will be only using the WebDriver API you do not need the Selenium-Server. If your browser and tests will all run on the same machine, and your tests only use the WebDriver API, then you do not need to run the Selenium-Server; WebDriver will run the browser directly.

There are some reasons though to use the Selenium-Server with Selenium-WebDriver.

  • You are using Selenium-Grid to distribute your tests over multiple machines or virtual machines (VMs).
  • You want to connect to a remote machine that has a particular browser version that is not on your current machine.
  • You are not using the Java bindings (i.e. Python, C#, or Ruby) and would like to use HtmlUnit Driver.
like image 74
Ripon Al Wasim Avatar answered Oct 14 '22 21:10

Ripon Al Wasim


Selenium RC injects javascript function into browsers when the web page is loaded.

Selenium WebDriver drives the browser using browser's built-in support.

like image 23
pkhabya Avatar answered Oct 14 '22 23:10

pkhabya