Trying to get firefox to run using selenium in spyder. My current code is
from selenium import webdriver
import os
os.environ[\"PATH\"] += \":/usr/local/bin/
This error message...
WebDriverException: 'geckodriver' executable needs to be in PATH.
...implies that the GeckoDriver wasn't found in the expected default location.
As you are using MAC based System you need to pass the Key executable_path along with the Value referring to the absolute path of the GeckoDriver as follows :
from selenium import webdriver
browser = webdriver.Firefox(executable_path='/usr/local/bin/geckodriver')
Ensure the following :