Install Selenium WebDriver and Enjoy the Advantages
The addition of a Web driver API to Selenium 2.0 has enabled it to provide a simpler, more concise programming interface in addition to addressing some limitations in the Selenium-RC API. This article takes the reader through the installation of Selenium WebDriver, covering the commands, supported drivers and a sample script.
Selenium WebDriver is the successor to Selenium RC, or we can say that Selenium 1.0 + WebDriver = Selenium 2.0. It provides a simple interface, supports dynamic Web pages, supplies a well-designed object-oriented API, etc.
Simon Stewart is the inventor of WebDriver. Selenium WebDriver is fully implemented and supported in Java, Ruby, Python and C#. It programmatically controls the browser. Using WebDriver, script browsers can be programmed.
Installing Selenium WebDriver
1. Install the latest version of Java 2. Download Eclipse IDE for Java developers from http://www.eclipse. org/downloads/ 3. Download Selenium Java driver from http://docs.seleniumhq.org/ download/ 4. Configure WebDriver with Eclipse IDE by going through the following steps: • Launch eclipse.exe • Set the workspace • Create a Java project using File->New->Java project in the Eclipse IDE • Create a Class in the Java project by right-clicking on it, and select New-Class • Now, add Selenium WebDriver in the Java build path • Select the project created in the above steps, right-click on it and select the Properties option In the Properties window, click on Java Build Path->Add External Jars • This will open the window
depicted in Figure 4.