This section is for those test script developers who have quite a few test scripts already written in Selenium 1, also known as Selenium RC, and are planning to move to WebDriver. Moving entirely to WebDriver is a good idea theoretically, but when it comes to migrating the test scripts, it is a task that is going to keep you busy for a while, depending on how abstract your current test scripts are. The WebDriver library has provided us a class named WebDriverBackedSelenium
, using which you can start leveraging WebDriver APIs while making sure your old Selenium 1 test scripts work fine. Before we look at WebDriverBackedSelenium
, let us see how the good old Selenium 1 test scripts look.
If you remember, in Chapter 1, Introducing WebDriver and WebElements, we have discussed the history of Selenium and seen how Selenium 1 used to work by injecting the Selenium-core JavaScript into the browser and driving it, as shown in the following diagram:
Just as with RemoteWebDriver...