Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot start the driver service on http://localhost

I would kindly like to ask for help an issue I have running selenium on on a windows server without an interface, I get the following error:

Cannot start the driver service on http://localhost:49906/ at OpenQA.Selenium.DriverService.Start() at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute) 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(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout) at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)

like image 388
THATO MOLEFE Avatar asked Sep 17 '18 09:09

THATO MOLEFE


2 Answers

Changed my Target Framework to .NET Core 2.1 (previously set to .net core 3.0) now its working.

like image 53
Suresh Bhandari Avatar answered Oct 06 '22 22:10

Suresh Bhandari


In my case, it was because there are too many background chrome process running. Run cmd as admin and use taskkill /f /im chromedriver.exe to kill all chrome driver instances and use taskkill /f /im chrome.ext /t to kill all chrome instances made it work.

like image 41
Grace Avatar answered Oct 06 '22 21:10

Grace