Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what's the relationship between Selenium RC and WebDriver?

I can see that since selenium 2.0, WebDriver and Selenium RC are packaged together for download. Now I primarily use WebDriver, but can I bring in Selenium RC in my testing scripts from now and then? Is there anything that Selenium RC is capable of but WebDriver is not, or vice versa?

like image 582
zihaoyu Avatar asked Sep 01 '10 15:09

zihaoyu


People also ask

What is the difference between Selenium RC and Selenium WebDriver?

Selenium WebDriver is purely object oriented API, whereas Selenium RC is less object oriented API. WebDriver is entirely based on object oriented programming languages like Java, C#, etc.

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.

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 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.


1 Answers

You should probably start your research here (though you may have already gone over this): http://seleniumhq.org/docs/03_webdriver.html

I'll assume you're contrasting Selenium-RC to WebDriver, Selenium-IDE really isn't in the same ballpark.

Selenium uses JavaScript to automate web pages. This lets it interact very tightly with web content, and was one of the first automation tools to support Ajax and other heavily dynamic pages. However, this also means Selenium runs inside the JavaScript sandbox. This means you need to run the Selenium-RC server to get around the same-origin policy, which can sometimes cause issues with browser setup.

WebDriver on the other hand uses native automation from each language. While this means it takes longer to support new browsers/languages, it does offer a much closer 'feel' to the browser. If you're happy with WebDriver, stick with it, it's the future. There are limitations and bugs right now, but if they're not stopping you, go for it.

Selenium Benefits over WebDriver

  • Supports many browsers and many languages, WebDriver needs native implementations for each new language/browser combo.
  • Very mature and complete API
  • Currently (Sept 2010) supports JavaScript alerts and confirms better

Benefits of WebDriver Compared to Selenium

  • Native automation faster and a little less prone to error and browser configuration
  • Does not require Selenium-RC Server to be running
  • Access to headless HTMLUnit can allow tests to run very fast
  • Great API
like image 158
pnewhook Avatar answered Oct 14 '22 05:10

pnewhook