ChromeDriver does not exist in Selenium WebDriver C# test script

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

    Could this be because NuGet packages are being loaded from a global place instead of the packages folder of the .NET Framework projects. This worked for me:

    IWebDriver driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
    

提交回复
热议问题