0

I'm getting Error in docker environment: selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities.

Here's my config:

Python 3.9.0
selenium==3.141.0
webdriver-manager==3.2.2
pymongo==3.11.0
Mozilla Firefox 78.4.0esr
geckodriver 0.27.0
location for geckodriver:'usr/loca/bin'

My sample code for test:

    from selenium import `webdriver` 
    from selenium.webdriver import FirefoxOptions
    opts = FirefoxOptions() 
    opts.add_argument("--headless") 
    browser = webdriver.Firefox(options=opts) 
    browser.get('https://stackoverflow.com')
dejdej
  • 2,590
  • 4
  • 16
  • 28

1 Answers1

0

I spent an hour on this and solved the problem by downgrading geckodriver to 0.26.0 There may be an issue with the latest release, I am not confident enough in my setup and/or ability to confirm this.

Bity
  • 43
  • 1
  • 6