selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service geckodriver
- selenium 3.0.0b3
- geckodriver-v0.11.1-linux64.tar.gz unpacked to /bin /usr/bin
- firefox 48.02
- code:
from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
caps = DesiredCapabilities.FIREFOX caps["marionette"] = True caps["binary"] = "/usr/bin/firefox" driver = webdriver.Firefox(capabilities=caps)
- running:
Traceback (most recent call last):
File "test.py", line 3, in
Any idea?
Bests,
Can you please paste the contents of the geckodriver.log file from your current working directory?
@andreastt
cat geckodriver.log 1476111009361 geckodriver INFO Listening on 127.0.0.1:58451
I’m not able to reproduce this with selenium-3.0.0b3 off pip. It looks like geckodriver is starting successfully on the port the Python client is requesting it to, and that the client subsequently times out when attempting to connect on that port.
linking https://github.com/SeleniumHQ/selenium/issues/2903
Closing this as I cannot reproduce.
Reproducing for my team, using selenium 3.0.1 on Mac OS Sierra.
Tests fail to start with error:
Traceback (most recent call last):
File "test.py", line 4, in
Any idea on what the problem might be? Please note that the same happens for chromedriver.
If it's happening for multiple drivers it sounds like a selenium issue.
I'll report this for Selenium, thank you.
@dongxiexidian If you had read the actual comments on this issue before commenting, you would have realised this is a Selenium issue.
windows7 64 python 3.6 selenium 3.6 geckodriver 0.9
I resolved it . remove the comment on hosts file C:\Windows\System32\drivers\etc\hosts 127.0.0.1 localhost
^0^