Selenium.WebDriver - I get error when I try to run my test in Chrome

后端 未结 4 1838
暖寄归人
暖寄归人 2021-02-19 04:28

I get this error when I try to run my test in Chrome:

Initialization method AutomationUsingSelenium.SmuladorChrome.MyTestInitialize threw exception. OpenQ

4条回答
  •  后悔当初
    2021-02-19 05:16

    Finally I resolved my issue as follows:

    1) I copied chromedriver.exe in Chrome directory link, but you can put it in any directory. I decided to put it here.

    2) I Initialized a new instance of the ChromeDriver class using the specified // path to the directory containing ChromeDriver.exe

    My code:

    IWebDriver drive = new ChromeDriver
    ("C:\\Documents and Settings\\...\\ApplicationData\\Google\\Chrome\\Application");
    

    And it works just perfect. Thanks All.

提交回复
热议问题