Obvious reason to move from Selenium RC to Webdriver.?

Ranadheer Reddy picture Ranadheer Reddy · May 28, 2012 · Viewed 9.5k times · Source

From past 4 months am doing automation testing using Selenium RC.

But recently i came to know that Selenium RC is deprecated. So many people suggested me to change to Selenium Webdriver.

So, can anyboby tell me whats the problem with Selenium RC and how Webdriver is better than RC ??

Thank you.

Answer

A.J picture A.J · May 28, 2012

Well, there are multiple reasons. Here are few in no particular order

  1. Webdriver offers a cleaner API than selenium RC. The most common example is you have selenium.type and selenium.typeKeys, both does the same thing in effect. Webdriver offers just one method sendKeys for all type related action. In short you can say, webdriver classes are better organized?

  2. Selenium works using javascript injection. If you have worked with selenium for sometime, then you must be aware of the same origin policy issues and limitations of javascript injection. Webdriver overcomes this by using a driver for each browser. For firefox this means, webdriver attaches itself to browser as an addon, for IE it uses automation atoms and for chrome and opera it uses the chrome driver.

  3. Due to the above mentioned reason, webdriver tests are faster than Selenium

  4. Its much easier to extend webdriver compared to selenium. Webdriver provides extendable action classes which you can combine and create your own customized actions.

  5. Webdriver can support testing in mobile devices such as Iphone, ipad and android phones and tablets.

Last but not at all the least, there is no development work happening in selenium project now. Whatever is available now, will continue to be supported but no new methods or enhancements are happening for selenium. Selenium and webdriver projects were merged some years back and became Selenium 2.0

You can find additional details about webdriver here and reason for merger here