Selenium unable to start Firefox Selenium unable to start Firefox selenium selenium

Selenium unable to start Firefox


Try:

driver = webdriver.Firefox(executable_path="path to your driver")

eg: driver = webdriver.Firefox(executable_path="C:\Python27\wires.exe")


Try using the complete path to firefox executable. Maybe it's not listed in you variable environment path..

from selenium import webdriverdriver = webdriver.Firefox("/path/to/firefox")

This should tell your script where to find the firefox executable.

Edit:

If you're using Windows, try using double slashes.

I.e.: 'C://Program Files (x86)//Mozilla Firefox//firefox.exe'

Or marking it as a raw string:

I.e.: r'C:/Program Files (x86)/Mozilla Firefox/firefox.exe'


You need to write the following lines of Code to run Firefox with Selenium 3:

from selenium.webdriver.firefox.firefox_binary import FirefoxBinaryff_Binary = FirefoxBinary('C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe')driver = webdriver.Firefox(firefox_binary = ff_Binary)