Firefox WebDriver instance not created with selenium python bindings

I set selenium-python bindings and tried to instantiate the firefox web driver as below

>>> from selenium import webdriver >>> driver = webdriver.Firefox() 

I do not know what is wrong here and displays the following error:

 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/site-packages/selenium-2.21.3-py2.7.egg/selenium/webdriver/firefox/webdriver.py", line 51, in __init__ self.binary, timeout), File "/usr/lib/python2.7/site-packages/selenium-2.21.3-py2.7.egg/selenium/webdriver/firefox/extension_connection.py", line 47, in __init__ self.binary.launch_browser(self.profile) File "/usr/lib/python2.7/site-packages/selenium-2.21.3-py2.7.egg/selenium/webdriver/firefox/firefox_binary.py", line 44, in launch_browser self._wait_until_connectable() File "/usr/lib/python2.7/site-packages/selenium-2.21.3-py2.7.egg/selenium/webdriver/firefox/firefox_binary.py", line 81, in _wait_until_connectable self._get_firefox_output()) selenium.common.exceptions.WebDriverException: Message: 'The browser appears to have exited before we could connect. The output was: Error: cannot open display: :1100\n' 

Can anyone please let me know how to solve this ..............

+4
source share
1 answer

The error says: "Unable to open display :: 1100". Do you use it on a remote terminal? Make sure you can enter β€œfirefox” at the prompt and open a browser (this is what Webdriver does - it opens Firefox on your system and then tries to connect to it). If you use it on a remote system, search the Internet when connecting to X remotely.

+1
source

All Articles