OpenSource For You

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 programmin­g interface in addition to addressing some limitation­s in the Selenium-RC API. This article takes the reader through the installati­on 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 implemente­d and supported in Java, Ruby, Python and C#. It programmat­ically 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.

 ??  ?? Figure 2: Configure Eclipse with WebDriver
Figure 2: Configure Eclipse with WebDriver
 ??  ??

Newspapers in English

Newspapers from India