Installing Selenium WebDriver





Installing Selenium WebDriver

Under this Tutorial you will install Configure Eclipse and Webdriver (Java only).

Step 1 – First Install the Java on the computer

First Download and install the Java Software Development Kit (JDK).
From the following url: http://www.oracle.com/technetwork/java/javase/downloads/index.html

Installing Selenium WebDriver
Installing Selenium WebDriver


Step2: Now need to install the Edipse IDE
Download the “Eclipse IDE for Java Developers” from the url given below. Be sure to select appropriate between the versions of Windows 32 Bit and 64 Bit.
url for download -: http://docs.seleniumhq.org/download

 install the Edipse IDE
install the Edipse IDE

Step 3 – Download the Selenium Java Client Driver

We can download Selenium Java Client Driver from url given below. We will search the client driver for another language, but only select the one only Java out of all.
Url - http://seleniumhq.org/download/

Such download come as the ZIP file ‘selenium - 2.25.0.zip’. For more easiness, pull out the content of available ZIP files on our C drive so that we would have to use directory “C:\selenium - 2.25.0\”. This directory includes all JAR files that you would import later on Eclipses.

Step 4 – Configure Eclipse IDE with the WebDriver

  1. Start “eclipse.exe” file inside the “eclipse” folder that we extracted in step 2. If we followed step 2 appropriately, the run able should be situated on C:\eclipse \eclipse.exe.
  2. When asked to choose for the workspace, just agree to the location default.

  Now Just develop the new project through File -> New -> Java Project. Name of the project as “my project”.
  Now Just Right - click on the newly developed project and choose the New -> Packages, and namng that package as “my package”.
  Develop the new Java class inside my package by right - clicking on it and then choosing the New -> Class, and then name it as quite like “my class”.
  Right - click on my project and choose the Properties.
  From Properties dialog, Need to click on “Java Build Path”.
  Now need to Click on the Libraries tab, and then click on “Add External JARs...”
  Now Visited the C:\selenium-2.25.0\ (or any another site where we saved the extracted content of “selenium - 2.25.0.zip” in step 3).
  Need to Add all the available JAR files and outside the folder “libs”. Our Properties dialog box should now looks like similar to the image.
  Lastly, click the button OK and you have completed the importing Selenium libraries into available projects.

Different Drivers

HTML Unit and Firefox both are two browsers that WebDriver can automate directly – stands that no other divided components are required to configure or execute during the test is being run. For some more browsers, the separate programs are required. That programs are called as Driver Server.
The driver servers are different from each other browsers. For an example, Internet Explorer has its own drivers for servers which we can not utilize on other browser. List given below is the list of servers of driver and the corresponding browsers that utilize them.


Different Drivers
Different Drivers


Summary

  • Apart from the browsers, we will require to follow to start the utilizing WebDriver
  • Java Development Kit (JDK). http://www.oracle.com/ technetwork/java/javase/downloads/index.html
  • Eclipse IDE - http:// www.eclipse.org/downloads/
  • Java Client Driver - http:// seleniumhq.org/download/
  • When launching the WebDriver projects in Eclipse, don’t forget to import the Java Client Driver files onto our projects. Such files will comprise our Selenium Library.
  • Firefox and HTMLUnit are the only browser that make us and can automate without the help of any Driver Server.
  • All and each browsers have its own server of driver.
  •  
  •  


No comments:

Post a Comment

Popular Posts