Answer the question
In order to leave comments, you need to log in
Why won't Firefox 52 ESR run under geckodriver?
Good day dear community. Please guide me in the right direction. Please tell me why I can't start Firefox with selenium webdriver. Selenium installed with pip. I took the drivers for Chrome and Firefox from the official pages on GitHub. When writing simple code
from selenium import webdriver
browser=webdriver.Chrome("C:\\chromedriver.exe")
from selenium import webdriver
browser=webdriver.Firefox("C:\\geckodriver.exe")
Traceback (most recent call last):
File "C:\Users\PC1\Desktop\SeleniumWebDR.py", line 3, in
browser=webdriver.Firefox("C:\\geckodriver.exe")
File "C:\Users \PC1\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 151, in __init__
firefox_profile = FirefoxProfile(firefox_profile)
File "C:\Users\ PC1\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\firefox\firefox_profile.py", line 80, in __init__
ignore=shutil.ignore_patterns("parent.lock", "lock ", ".parentlock"))
File "C:\Users\PC1\AppData\Local\Programs\Python\Python37-32\lib\shutil.py", line 309,in copytree
names = os.listdir(src)
NotADirectoryError: [WinError 267] Invalid folder name: 'C:\\geckodriver.exe'
Traceback (most recent call last):
File "C:\Users\PC1\Desktop\SeleniumWebDR.py", line 3, in
browser=webdriver.Firefox()
File "C:\Users\PC1\AppData\Local\Programs\ Python\Python37-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 174, in __init__
keep_alive=True)
File "C:\Users\PC1\AppData\Local\Programs\Python\Python37 -32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\PC1\AppData\Local\Programs\Python\ Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\PC1\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response )
File "C:\Users\PC1\AppData\Local\Programs\Python\Python37-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
from selenium import webdriver
browser = webdriver.Firefox(capabilities={"marionette": False})
Answer the question
In order to leave comments, you need to log in
Try the version from this link
Put it in the folder that you added to PATH
Use the following code to test:
from selenium import webdriver
driver = webdriver.Firefox()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question