Can somebody tell me how to use the Chrome driver in Selenium for Linux platform?
I have my chrome driver location at username/home/chromedriver
.
My code is:
System.setProperty("webdriver.chrome.driver", "/home/username/ChromeDriver/chromedriver");
driver = new ChromeDriver();
driver.get("facebook.com");
The error I am getting is:
org.openqa.selenium.WebDriverException
: Unable to either launch or connect to Chrome. Please check that ChromeDriver is up-to-date.Using Chrome binary at:
/opt/google/chrome/google-chrome
(WARNING: The server did not provide any stacktrace information)
username/home/chromedriver
) and your configuration (/home/username/ChromeDriver/chromedriver
) don't match. Make sure you use the right path at every location. Apart from this, everything should be ok, this is how I initialize mine Chrome, too. Try re-downloading all the parts once again. Don't forget to unzip the chromedriver package. – Oakley