ChromeDriver does not exist in Selenium WebDriver C# test script

前端 未结 10 647
南旧
南旧 2021-02-01 02:24

I have come across a few people with the same issue that seemed to have solved the problem with System.addProperty(\"webdriver.chrome.driver\", \".../chromedriver.exe\");<

10条回答
  •  醉梦人生
    2021-02-01 02:57

    Since you're using C#, you should use the constructor overload for ChromeDriver that allows you to specify the path to the directory containing chromedriver.exe. To wit:

    IWebDriver driver = new ChromeDriver(@"C:\my\path\to\chromedriver\directory");
    

提交回复
热议问题