Selenium vs. WebDriver, any obvious benefits?

I moved from SeleniumRC to WebDriver for almost two years. But I have to say that I did not feel any obvious advantages for webdriver over rc. Now I have 200+ test cases with the C # driver on the website. But when I carefully run them for regression testing, I usually get 150, and 50+ is unsuccessful / erroneous. After launching unsuccessful test cases for the second time, many of them passed, only a few of them turned out to be problems with the testing code. As I can see this, sometimes WebDriver really works slowly, and I have never encountered such a situation when I used SeleniumRC before. As a result, I began to doubt the need to switch from rc to webdriver, because it took me much longer to check for errors and crashes than before.

So my question is, are there any advantages for webdriver over rc to make it switch from rc to webdriver? If so, can you please tell me? Also, tell me about the flaws.

+6
source share
3 answers

What @OCary said.

However, the new and more powerful WebDriver also has some limitations. Since this is work in progress, the behavior of different versions changes slightly from time to time. In addition, almost all the intended functions have not yet been implemented, it will take a little more time for it to be stable, error-free and fully developed. For example: SafariDriver has just landed, window controls are skipped, you cannot upload files in a convenient way, etc.

But a healthy development in WebDriver is better than today, non-existent development on Selenium 1 (it just won't improve.), Right?

+3
source

Selenium RC injects Javascript into the page to control the interaction. Webdriver interacts directly with the browser. The disadvantages of using additional Javascript have disadvantages, as the Selenium HQ website claims this pretty well.

While Selenium was a terrific tool, it was not without its flaws. Thanks to its Javascript-based automation mechanism and security, browser restrictions apply to Javascript, different things have become impossible to do. To make things worse, web applications have become increasingly powerful over time, using all kinds of new browser features to provide and make these restrictions more painful.

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

Another way to think about testing a page on which more JS has been added is not actually checking the original page; You are testing a modified page.

+12
source

In my experience, Selenium RC is the most stable and reliable web testing platform I have used. I recently started evaluating WebDriver (aka Selenium 2) for the reason that everyone says that this is the future of Selenium. So far I have not been impressed. Simple things (for example, clicking a button) do not work consistently in different browsers and require different workarounds. I understand that there are limitations to what you can do with JavaScript, but I would not want to sacrifice the stability of my tests to overcome these limitations.

+2
source

Source: https://habr.com/ru/post/911169/


All Articles