c# - The path to the driver executable must be set by the webdriver.chrome.driver system property - Selenium Error -
i have infuriating selenium error:
the path driver executable must set webdriver.chrome.driver system property
here code using:
environment.setenvironmentvariable("webdriver.chrome.driver", @"c:\chromedriver\chromedriver.exe"); desiredcapabilities capability = desiredcapabilities.chrome(); chromeoptions options = new chromeoptions(); options.binarylocation = @"c:\program files (x86)\google\chrome\application\chrome.exe"; capability.setcapability(chromeoptions.capability, options); uri url = new uri("http://localhost:5050/wd/hub"); //error on line iwebdriver driver = new remotewebdriver(url, capability);
i have driver on disk, @ location.
the selenium server running, shown below:
i have added selenium binary system variable, shown below:
i have restarted server too.
what missing? feels though doing correctly, it's not working.
thanks
with new selenium, 3.0 should use:
java -dwebdriver.chrome.driver=path_to_chrome_driver -jar selenium-server-standalone-3.0.0-beta2.jar
if using selenium version below 3.0 need reverse order of selenium driver, like:
java -dwebdriver.chrome.driver=path_to_chrome_driver -jar selenium_server.jar
also make sure selenium server compatible chromedriver. other thing check chrome browser date.
Comments
Post a Comment