I get this error when I try to run my test in Chrome:
Initialization method AutomationUsingSelenium.SmuladorChrome.MyTestInitialize threw exception. OpenQ
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 selecting chromedriver.exe
file name.
driver = new ChromeDriver("G:\\Selenium_Csharp\\Jar\\chromedriver_win32");
driver.Url ="http://www.gmail.com";
driver.Manage().Window.Maximize();
OR
driver = new ChromeDriver(@"G:\Selenium_Csharp\\Jar\\chromedriver_win32");
driver.Url ="http://www.gmail.com";
driver.Manage().Window.Maximize();