What AJ said.
There are limitations on RC that cannot be easily overcome.
Extensibility is a big problem. I seriously cannot stress this. When I expanded some of the RC methods to do more work, they did it normally, I ran into a barrier that could not be easily passed. What can be done in RC with 750 lines of code and intensive use of the command template can be done in WebDriver with just a few simple methods.
the same origin policy . This is a Javascript security policy that allows you to run code only from the domain in which you are located. And since RC is completely written in Javascript, you cannot easily switch between domains or work with some websites that redirect or use frames with content from many domains.
Due to a different security policy in Javascript, you cannot fill in the inputs <input type='file' /> and use several workarounds.
You cannot work well with onload modal Javascript dialogs. Those, again, should work.
Selenium tries to hide these dialogs from you (replacing window.alert, window.confirm and window.prompt), so they will not stop the execution of your page. If you see a pop-up warning, it’s probably because it was launched during the page loading process, which is usually too early for us to protect the page.
You cannot maximize the window in RC :).
You need to write your own methods when you need to wait for an element.
RC is no longer being developed; there will be nothing new. It took some time for WebDriver to grab hold of all the features, but now it's time that WebDriver finally has a little more to offer than RC (expectations and maximization). And it will only get better!
The RC method getEval() is a bad cousin of WebDriver executeJavascript() . The first returns a String and cannot be specified, for example. specific page element. The latter can return many built-in language data structures, WebElements , Lists WebElements , and can take them as arguments! This means that you can find the element with WebDriver and then run multiple JS on it. With RC, you will also need to find the element using JS. This can be done, but more complicated and much more error prone.
Mainly. There is also a reason to NOT switch: the WebDriver API is young and still changing. Sometimes a small change in behavior occurs when they correct a mistake. Therefore, sometimes there is pain in the ass in order to renew and find that she broke something.
However, I would not return to RC, since WebDriver is so nice to work with. And I look forward to a lot next year when WebDriver, we hope, will fix the most unpleasant oddities.
Petr janeček
source share