Selenium vs. WebDriver, any obvious advantages? Selenium vs. WebDriver, any obvious advantages? selenium selenium

Selenium vs. WebDriver, any obvious advantages?


Selenium RC injects Javascript into the page to drive the interactions. Webdriver interacts directly with the browser. Injecting additional Javascript has disadvantages, with the Selenium HQ site stating it rather well.

While Selenium was a tremendous tool, it wasn’t without its drawbacks. Because of its Javascript based automation engine and the security limitations browsers apply to Javascript, different things became impossible to do. To make things “worst”, webapps became more and more powerful over time, using all sorts of special features new browsers provide and making this restrictions more and more painful.

http://seleniumhq.org/docs/01_introducing_selenium.html#selenium-history

Another way to think about it is that testing a page that has had more JS added, you're not really testing the original page; you're testing a modified page.


What @OCary said.

However, the new and more powerful WebDriver has some limitations, too. Because it is a work-in-progress, it's behaviour between different versions changes slightly from time to time. Also, not nearly all intended features have been implemented yet, it will take some more time to have it stable, bug-free and fully developed. For example: the SafariDriver has just landed, the window controls are missed, you can't download files in a convenient way etc.

But a healthy development on WebDriver is better than today's non-existant development on Selenium 1 (It just won't get any better.), right?


From my experience Selenium RC is the most stable and robust web testing framework I have used. I recently started evaluating WebDriver (aka Selenium 2) for the reason that everybody says it is the future of Selenium. So far I am not impressed. Simple things (like clicking a button) do not work consistently across different browsers and require different workarounds. I realize that there are limitations in what you can do with JavaScript, but I would not want to sacrifice the stability of my tests to get over those limitations.