What A.J. said.
There are limitations on RC that can't be overcame easily.
The extendability is a great issue. I seriously can't stress that enough. When I expanded some of the RC methods to do more work they did normally, I bumped into a barrier that could not be passed easily. What could be done in RC with 750 lines of code and heavy use of the Command pattern, can be done in WebDriver with just a few simple methods.
The same origin policy. It is a Javascript security policy that allows running the code only from the domain you're on. And since RC is fully written in Javascript, you can't easily switch between domains or work with some websites that redirect or use frames with content from many domains.
Because of another security policy in Javascript, you can't fill in <input type='file' />
inputs and have to use several workarounds.
You can't work well with onload
Javascript modal dialogs. Those, again, have to be worked around.
Selenium tries to conceal those dialogs from you (by replacing
window.alert, window.confirm and window.prompt) so they won’t stop the
execution of your page. If you’re seeing an alert pop-up, it’s
probably because it fired during the page load process, which is
usually too early for us to protect the page.
You can't really maximize the window in RC :).
You have to write your own methods when you need to wait for an element.
RC is no longer developed, there will be nothing new. It took some time for WebDriver to catch on on all the features, but now the time has come that WebDriver finally can offer slightly more than RC (the waits and maximizing). And it will get only better!
The RC's getEval()
method is a poor cousin of WebDriver's executeJavascript()
. The former returns a String
and can't be given e.g. a specific page element. The latter one can return directly many in-built language data structures, WebElements
, Lists
, and can take those as arguments, too! That means that you can find an element with WebDriver and then run some JS on it. With RC, you would have to locate the element with JS, too. That can be done, but is harder and much more error-prone.
That's mostly it. There is a reason NOT to switch, too: the WebDriver
API is young and is still changing. Sometimes, there is a slight behavioral change when they fix a bug. Therefore, sometimes, it's a pain in the ass to upgrade and discover that it broke something.
That said, I would not go back to RC since WebDriver is so nicer to work with. And I am looking forward a lot for a time next year when WebDriver will hopefully have its most annoying oddities fixed.