selenium wont work with Firefox or Chrome
For both Firefox and Chrome you now need to download geckodriver / chromedriver.These drivers are necessary to communicate between your installed browser and selenium. So you need:
- Install selenium for python (
pip install selenium
) - Download drivers for the browser you want to use (chromedriver, geckodriver, operadriver etc)
- Install the browser you want to use on your system (probably already have this)
Now you can add the geckodriver to your path as metioned in this anwser. Or you can set it up directly in your code like this:
Chome:
driver = webdriver.Chrome(executable_path='/path/to/chromedriver.exe')
Firefox:
driver = webdriver.Firefox(executable_path='/opt/geckoDriver/geckodriver.exe')