I am trying automate a login process to my web application using Selenium-Python Client Library. The ultimate goal is to learn Selenium\'s Python Client Library. So, I would
Firefox (and other graphical browsers) require an X display. You can use a virtual one with the help of PyVirtualDisplay:
from pyvirtualdisplay import Display
display = Display(visible=0, size=(1024, 768))
display.start()
browser = webdriver.Firefox()
... more selenium code ...
display.stop()
Apart from PyVirtualDisplay, you'll also need its dependencies xfvb and Xephyr (on debian: apt-get install -y xvfb xserver-xephyr
)
You can also use PhantomJS and Ghostdriver to run Selenium without a GUI-based browser.
https://github.com/detro/ghostdriver