What are the actual issues with backing Selenium WebDriver with Selenium RC?

102 Views Asked by At

In the Selenium WebDriver documention about backing WebDriver API usage with Selenium RC it is stated:

There are currently some major limitations with this approach, notably that findElements doesn’t work as expected. Also, because we’re using Selenium Core for the heavy lifting of driving the browser, you are limited by the JavaScript sandbox.

However, I can't find any more information on what those limitations are: does anyone know what they are or can provide further links to further information?

1

There are 1 best solutions below

3
On

This bit in the wiki in particular, is talking about how you can use the Selenium 1 commands Inside of the Selenium 2 test which is BAD.

To answer your question about those limitations... we need to first understand the difference between Selenium 1 and 2.

Selenium 1: Executes arbitrary JavaScript against the page

This being said, it has limitations right out of the box. For example, a click might not be caught by a javascript event since it's not actually invoking a "click" on the browser, rather, just faking a click using JS.

Selenium 2: Ties directly into the browser using the WebDriver API

This being said, Selenium 2 will invoke native code, that the user would actually perform against the selected element.

So in the context of executing Selenium 1 tests inside of a Selenium 2 test... Since Selenium 1 is executing JavaScript, you aren't performing what the user would actually be doing.

Also keep in mind, the wording says "limitations with this approach". There is no complete "list" of limitations. In itself, it IS limiting because you are providing Legacy support to newer scripts. Which, while nice to have, should never really be necessary.. Either stick to Selenium 1, or 2.