I get error when I try to run my test in Chrome :
Initialization method AutomationUsingSelenium.SmuladorChrome.MyTestInitialize threw exception. OpenQA.Selenium.DriverServiceNotFoundException: OpenQA.Selenium.DriverServiceNotFoundException
What is the cause?
Finally I resolve my issue.
1) I copied chromedriver.exe in Chrom directory link, but you can put in any directory, I decided to put here.
2) I Initialized a new instance of the ChromeDriver class using the specified // path to the directory containing ChromeDriver.exe
My code:
And it works just perfect. Thanks All.
Lets assume
chromedriver.exe
is present in below path:G:\Selenium_Csharp\Jar\chromedriver_win32\chromedriver.exe
To execute your test in Chrome set the path to the directory/folder containing
chromedriver.exe
without selectingchromedriver.exe
file name.OR
Install
Selenium.Chrome.WebDriver
NuGet package to the project and you will not get the error again.Enjoy Selenium.
This is the error i see: OpenQA.Selenium.DriverServiceNotFoundException: The chromedriver.exe file does not exist in the current directory or in a directory on the PATH environment variable.
I resolved this problem by specifying the 'testsettings' argument in the command to run the unit tests.
E.g.
I use "/testsettings:......\Local.Testsettings" because the Local.testsettings file is 4 levels higher than the level where I am executing this command. You should change it accordingly.
This is the command used in ccnet.config file