Selenium WebDriver.ChromeDriver Nuget package installed, but not working for MSTest

后端 未结 7 506
予麋鹿
予麋鹿 2020-12-17 16:06

I have added the WebDriver.ChromeDriver nuget package to my solution, which contains the ChromeDriver.exe file, required for Selenium WebDriver to run automated tests using

7条回答
  •  [愿得一人]
    2020-12-17 16:38

    I wouldn't bother with the NuGet package for this, simply because this is not a class library - which is technically, what NuGet is all about. ChromeDriver has also been updated many times since that release.

    Anyway, I would say that I have just done the same thing to see what the issue is:

    1. Download NuGet package
    2. Using Visual Studio, add a new item to the project by right-clicking on the project -> Add Item -> Existing Item
    3. Navigate and select the chromedriver.exe
    4. Change the properties to ensure "Copy to Output Directory" is set to Copy always.

    You are probably falling down on point 4. That setting is set to Do not copy by default.

提交回复
热议问题