c# - Selenium chrome failed to start -


running basic selenium test can think of.

using system; using microsoft.visualstudio.testtools.unittesting; using openqa.selenium.chrome; using openqa.selenium; using openqa.selenium.support.ui; using openqa.selenium.firefox;  namespace unittestproject1 {     [testclass]     public class unittest1     {         [testmethod]         public void testmethod1()         {             string path = @"d:\selenium webdrivers\chromedriver\";             iwebdriver driver;             driver = new chromedriver(path);         }     } } 

i using,

  • chrome version 52.0.2743.82 m
  • chromedriver 2.22
  • selenium webdriver 2.53.1
  • selenium webdriver support classes 2.53.1
  • win10 (recent upgrade)

i have tried uninstalling , reinstalling chrome , removing user profiles.

the error is,

test name: testmethod1 test fullname: unittestproject1.unittest1.testmethod1 test source: c:\users\user\documents\visual studio 2013\projects\unittestproject1\unittestproject1\unittest1.cs : line 13 test outcome: failed test duration: 0:00:01.3305496

result message: test method unittestproject1.unittest1.testmethod1 threw exception: system.invalidoperationexception: unknown error: chrome failed start (driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=windows nt 10.0.10586 x86_64) result stacktrace: @ openqa.selenium.remote.remotewebdriver.unpackandthrowonerror(response errorresponse) @ openqa.selenium.remote.remotewebdriver.execute(string drivercommandtoexecute, dictionary`2 parameters) @ openqa.selenium.remote.remotewebdriver.startsession(icapabilities desiredcapabilities) @ openqa.selenium.remote.remotewebdriver..ctor(icommandexecutor commandexecutor, icapabilities desiredcapabilities) @ openqa.selenium.chrome.chromedriver..ctor(string chromedriverdirectory, chromeoptions options) @ openqa.selenium.chrome.chromedriver..ctor(string chromedriverdirectory) @ unittestproject1.unittest1.testmethod1() in c:\users\user\documents\visual studio 2013\projects\unittestproject1\unittestproject1\unittest1.cs:line 15

try throwing chromedriver.exe in project/solution folder , appropriately changing path. should fix issue you.

note: firefoxdriver works because it's included in selenium packages, within project solution.


Comments

Popular posts from this blog

Combining PHP Registration and Login into one class with multiple functions in one PHP file -

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -