WebDriverException: Message: 'The browser appears to have exited before we could connect. The output was: Error: no display specified WebDriverException: Message: 'The browser appears to have exited before we could connect. The output was: Error: no display specified selenium selenium

WebDriverException: Message: 'The browser appears to have exited before we could connect. The output was: Error: no display specified


Selenium needs a display and as Linux does not have one , you need to download a virtual display (xvnc/xvfb). Then start the virtual display server and export the display.

Then it should work


Your error says that you didn't specify a display. This is a good qay to specify one.

$ export  DISPLAY =<<name of server where viewer is configured>>:<<port associated>> $ xhost +