0

Versions:

  • geckodriver 0.26.0 (in PATH environment variable)

  • selenium 3.141.0

  • Firefox 75.0

  • python 3.8.2

  • Windows 10

When I try:

from selenium import webdriver

driver = webdriver.Firefox()
driver.get('https://seleniumhq.org/')

I get this:

Traceback (most recent call last):
  File "C:\Users\Me\Desktop\python\FFtests.py", line 3, in <module>
    driver = webdriver.Firefox()
  File "C:\Users\Me\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 170, in __init__
    RemoteWebDriver.__init__(
  File "C:\Users\Me\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:\Users\Me\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\Users\Me\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Users\Me\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities

When I try:

from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

cap = DesiredCapabilities().FIREFOX
cap["marionette"] = False
driver = webdriver.Firefox(capabilities = cap)
driver.get('https://seleniumhq.org/')

I get this:

Traceback (most recent call last):
  File "C:\Users\me\Desktop\python\FFtests.py", line 6, in <module>
    driver = webdriver.Firefox(capabilities = cap)
  File "C:\Users\me\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 190, in __init__
    executor = ExtensionConnection("127.0.0.1", self.profile,
  File "C:\Users\me\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 52, in __init__
    self.binary.launch_browser(self.profile, timeout=timeout)
  File "C:\Users\me\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 73, in launch_browser
    self._wait_until_connectable(timeout=timeout)
  File "C:\Users\me\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 103, in _wait_until_connectable
    raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details.

IEDriver works fine for IE

I have Windows Visual Studio installed as https://github.com/mozilla/geckodriver/releases indicates I should.

What can I do to make this work?

1 Answers1

0

This is likely an issue with FireFox version. Try updating Firefox and Selenium.

  • Update Firefox
  • Update Selenium
  • Reinstall/update Geckodriver

See here for more solutions.

AzyCrw4282
  • 7,222
  • 5
  • 19
  • 35