I am getting an error when trying to open Firefox using Selenium in ipython notebook. I\'ve looked around and have found similar errors but nothing that exactly matches the
Requirements:
This is what I do:
pip3 install selenium
Download geckodriver v0.27.0
Extract geckodriver
mv geckodriver /usr/local/bin/
export PATH=$PATH:/usr/local/bin/geckodriver
check Xauthority with command --> locate Xauthority
cd /home/your-user/Xauthority
chown root: .Xauthority
create python code:
from selenium import webdriver
browser = webdriver.Firefox() browser.get('http://localhost')
Run python script.