I’m on AWS micro instance. There is no GUI. I SSH’ed into it.
pip install selenium
sudo apt-get install firefox
Then, I do this in the python shell:
>>> from selenium.webdriver.firefox.webdriver import WebDriver
>>> driver = WebDriver()
Error: cannot open display: :0
How do I make this error go away?
Set up your SSH session to allow X11 forwarding, and run your client from an X windows session. On the server, the config /etc/ssh/sshd_config should have the line
X11Forwarding yes. and your client side should haveForwardX11 yes. Then just to be sure invoke ssh with the -X option. The server side should have the program you want to run (firefox) installed.