Reputation: 423
I am running specflow in VS with chromedriver 2.22.0.0 (installed via nuget package). Locally, chromedriver launches and all tests run fine.
However, when trying to run in TeamCity 9, I get the following error:
Test(s) failed. System.InvalidOperationException : unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.3.9600 x86_64)
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)
I have checked that the package exists on the TeamCity server and it does. In fact, it actually launches chromedriver.exe in the background as I can see it in the Task Manager.
Could it be that the version of chromedriver is not compatible with windows server where TeamCity is running? Any ideas?
Any help appreciated!
Alternatively, what is best when running specflow tests with chromedriver in TeamCity?
Upvotes: 3
Views: 1039
Reputation: 1257
I had exactly the same issue, though on TeamCity 2017.1.5. For me it helped to install Chrome (actual full browser) on the same machine. It seems that ChromeDriver is sharing some code with the mothership ?
One would thought that ChromeDriver should be stand alone binary but that seems not be a case...
Upvotes: 1