I've moved from SeleniumRC to WebDriver for nearly two years. But I have to say that I haven't felt there's any obvious advantages for webdriver over rc. Now I have 200+ test cases with C# driver against a website. But when I run them thoroughly for regression testing, I usually get 150 passed and 50+ failed/errored. After running failed test cases for the second time, many of them passed, only few of them were proven to be issues with the testing code. As I can see it, sometimes WebDriver is really performing slowly, while I never met with such a situation when I was using SeleniumRC before. As a result, I started to doubt the necessity to move from rc to webdriver, because it took much more time for me to verify errors and failures than before.
So my question is, are there any advantages for webdriver over rc to make it worth it to move from rc to webdriver? If so, can you please kindly tell me? Also, tell me about the disadvantages.
You see, WebdriverIO is available for JavaScript (TypeScript) only, while most of the test automation projects are being developed using Java, Python and etc. So it's safe to say that WebdriverIO is better than Selenium if you develop automated tests using JavaScript (TypeScript).
First of all, the major benefit of automation testing with Selenium WebDriver is the fact that it is open source. It provides all the features of QTP and relatively more, completely free of cost. It can be downloaded directly from the official site and being community-based, support for the tool is also available.
Language Support :- One of the key advantages of Selenium WebDriver for automation testing is its multilingual support. WebDriver is compatible with all of the programming languages that testers should be familiar with, including Python, PHP, Java, C#, Ruby, and JavaScript.
But WebDriver being a core API offers multilingual support over different programming languages with the help of bindings. The core engine of Selenium IDE and RC is based on JavaScript, while on WebDriver, there is no core engine and the application can be worked with natively using only the browser.
Selenium developers do not know logic and logic will not be the same for all browsers, which have created WebDriver as an interface. The interface is a type in Java that only has one abstract method, that is, methods without body / logic. The RemoteWebDriver class implements the WebDriver interface that is extended by the browser drivers.
WebDriver supports all the programming languages that testers should know of such as like Python, PHP, Java, C#, Ruby, JavaScript etc. Although it has a customized script language, it also offers bindings to every major programming language. Adding flexibility to web developers to work on any programming language that they are comfortable with. 3.
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With