Firefox WebDriver Test with Selenium Python API


How to use Firefox WebDriver with Mozilla GechoDriver?



If you are using the Firefox WebDriver with the Selenium Python API, you need to make 'geckodriver' executable available in PATH environment variable.

1. Include path name of the 'chromedriver' executable in PATH environment variable.

C:\fyicenter> dir \fyicenter\selenium\geckodriver
        14,478,647 geckodriver.exe

C:\fyicenter>set path=\fyicenter\selenium\geckodriver;%path%

2. Run the again.

C:\fyicenter> python 
Traceback (most recent call last):
  File "", line 2, in <module>
    driver = Firefox()
  File "C:\Users\fyicenter\AppData\Local\Programs\Python\Python37-32
    \lib\site-packages\selenium\webdriver\common\", line 174, 
	in startstdin=PIPE)
selenium.common.exceptions.SessionNotCreatedException: Message: 
Unable to find a matching set of capabilities

As you can see, we are getting a diffrent error, "Unable to find a matching set of capabilities". See next tutorial on how to resolve the issue.


⇒ Compatibility of WebDriver Python API for Firefox

⇐ Firefox WebDriver Script with Selenium Python API

⇑ Starting with Selenium WebDriver Client Python API

⇑⇑ Selenium Tutorials

2019-11-08, 596👍, 0💬