ChromeDriver does not exist in Selenium WebDriver C# test script

前端 未结 10 674
南旧
南旧 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:46

    I found that although the Selenium.WebDriver.ChromeDriver NuGet package had been downloaded and consequently the chromedriver.exe file was being copied into the bin folder at compile time, additionally it needed to be marked as a deployment item (because it is a unit test that copied-into/run-from the TestResults folder) - i.e.

    [DeploymentItem(@"chromedriver.exe")]

提交回复
热议问题