When I initialize ChromeDriver, I get an error, thanks in advance for the quick response:

Exception in thread "main" org.openqa.selenium.chrome.FatalChromeException: Cannot create chrome driver System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_65' Driver info: driver.version: chrome at org.openqa.selenium.chrome.ChromeCommandExecutor.start(ChromeCommandExecutor.java:319) at org.openqa.selenium.chrome.ChromeDriver.startClient(ChromeDriver.java:67) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:72) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:27) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:45) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:55) at test.seofast.main(test.java:14) 

Here is the code:

 package test; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class seofast { public static void main(String[] args) { System.setProperty("webdriver.chrome.driver","chromedriver.exe"); WebDriver driver=new ChromeDriver(); driver.get("http://www.yahoo.com");} } 
  • Are you sure that you use a backslash when specifying the path in System.setProperty ? - Daniel Shatz 6:26
  • @DanielShatz, yes, the path is correct - as1andrey1

1 answer 1

For some reason, I don’t see your path to the driver itself. Simply writing chromedriver.exe, he will not find it, you need to specify the full path, so

 System.setProperty("webdriver.chrome.driver", "D:\\seleniumDriver\\chromedriver.exe"); 
  • Thanks for your reply. I did everything as you said: I changed the written full path. But the error has not changed. I look forward to hearing from you - as1andrey1
  • Is the first parameter correct: "webdriver.chrome.driver"? - as1andrey1
  • the first parameter is correct, show what path you wrote, maybe you wrote one backslash? - Vladislav