Thursday, December 19, 2013

Installing and Running Selenium WebDriver in Google Chrome


These are the steps I took to install and have Selenium WebDriver running on Google Chrome

In my case I already had eclipse and java up and running on my environment so I'll just focus on what's next.
  • Go to http://docs.seleniumhq.org/download/ and in this case download the WebDriver Java Client  at the moment of writting this post the version was 2.38.0 with release date 20013-12-05
  • Unzip selenium-java-2.38.0.zip to a folder of your choice
  • Download the Selenium server from http://docs.seleniumhq.org/download/ version 2.38 and save it on the same folder from above.
  • Open eclipse and Create a new Java project
  • Create a new package 
  • Create a new class like this

  • Configure the java build path of the project by including the 39(37 from the lib folder + 2) jar files from the WebDriver folder (step 2).
  • Download Chrome WebDriver from http://chromedriver.storage.googleapis.com/index.html I downloaded version 2.8 and move it to the same directory especified above.
  • Start the Selenium Server to use chrome driver with 
c:\Whatever\path\java -jar selenium-server-standalone-2.38.0.jar  -Dwebdriver.chrome.driver=c:\path\to\your\chromedriver.exe

  • Run.  
If everything is running correctly your console in eclipse should show: https://www.google.com






No comments:

Post a Comment