selenium webdriver - Launch chrome browser -


i trying launch chrome browser (version 26.0) using webdriver. getting following error message.

exception in thread "main" java.lang.illegalstateexception: path driver executable must set webdriver.chrome.driver system property; more information, see http://code.google.com/p/selenium/wiki/chromedriver.      @ com.google.common.base.preconditions.checkstate(preconditions.java:176)     @ org.openqa.selenium.remote.service.driverservice.findexecutable(driverservice.java:105)     @ org.openqa.selenium.chrome.chromedriverservice.createdefaultservice(chromedriverservice.java:69)     @ org.openqa.selenium.chrome.chromedriver.<init>(chromedriver.java:107)     @ googlesearch.main(googlesearch.java:13) 

code used:

driver = new chromedriver(); driver.navigate().to("http://www.google.com/"); 

i use mac 10.8.2.

for work, need to:

  1. install chrome
  2. install chrome web driver
  3. make sure have chrome web driver in path, example on windows pointing chromedriver2_win32_0.8. can put in path either: (a) modifying windows path environment variable, or; (b) adding following java command line options:
    -dwebdriver.chrome.driver='/path/to/driver'

in case of using selenium grid -dwebdriver.chrome.driver='/path/to/driver' has added while creating node command line.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -