Reputation: 2832
I am not able start ChromeWebDriver/IE/Firefox and it throws me a error message
This issue occurs only with
Doesn't occur with Python ChromeDriver binding
OpenQA.Selenium.WebDriverException:Cannot start the Driver Service on http://localhost:59343
Upvotes: 3
Views: 11159
Reputation: 33
Had the same issue with Selenium in PowerShell over corporate VPN, without VPN got "cannot find host proxy-dmz.corporate.com" instead. Turns out the hint in https://stackoverflow.com/a/70463561/2894535 was correct, but I had to set environment variables BEFORE loading the DLL. If the DLL is already loaded, you need to quit PowerShell and start new instance.
# This works
Remove-Item 'env:http*_proxy'
Add-Item -LiteralPath 'WebDriver.dll'
$driver = [ChromeDriver]::new()
# This also works
$env:NO_PROXY = 'localhost'
Add-Item -LiteralPath 'WebDriver.dll'
$driver = [ChromeDriver]::new()
# Those will not work
Add-Item -LiteralPath 'WebDriver.dll'
Remove-Item 'env:http*_proxy'
$driver = [ChromeDriver]::new()
# Or
Add-Item -LiteralPath 'WebDriver.dll'
$env:NO_PROXY = 'localhost'
$driver = [ChromeDriver]::new()
Upvotes: 0
Reputation: 1
I'm work using VPN in Windows, and I solved this issue setting an environment variable.
Variable: NO_PROXY
Value: localhost
Pac-Man team.
Upvotes: 0
Reputation: 1142
It could be the case that a process of the WebDriver is still running in the background. Fire up Task Manager to see and end it if does.
Upvotes: 2
Reputation: 51
I had the same problem, when I used Selenium.Webdriver 3.00-beta1 with Firefox in Visual Studio. After update to version 3.00-beta2 it start work good.
Upvotes: 2