Firefox WebDriver实例不是使用selenium python绑定创建的

Firefox WebDriver实例不是使用selenium python绑定创建的,python,firefox,selenium,webdriver,Python,Firefox,Selenium,Webdriver,我安装了selenium python绑定并尝试创建firefox web驱动程序的实例 如下 我不知道这里出了什么问题,它显示了以下错误 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/w

我安装了selenium python绑定并尝试创建firefox web驱动程序的实例 如下

我不知道这里出了什么问题,它显示了以下错误

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' 
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“/usr/lib/python2.7/site packages/selenium-2.21.3-py2.7.egg/selenium/webdriver/firefox/webdriver.py”,第51行,在__
self.binary,超时),
文件“/usr/lib/python2.7/site packages/selenium-2.21.3-py2.7.egg/selenium/webdriver/firefox/extension_connection.py”,第47行,在u init中__
self.binary.launch_浏览器(self.profile)
文件“/usr/lib/python2.7/site packages/selenium-2.21.3-py2.7.egg/selenium/webdriver/firefox/firefox\u binary.py”,第44行,在launch\u浏览器中
self.\u等待\u直到\u可连接()
文件“/usr/lib/python2.7/site packages/selenium-2.21.3-py2.7.egg/selenium/webdriver/firefox/firefox\u binary.py”,第81行,在“等待”直到“可连接”
self.\u获取\u firefox\u输出()
selenium.common.exceptions.WebDriverException:Message:“在我们连接之前,浏览器似乎已退出。”。输出为:错误:无法打开显示::1100\n
请告诉我如何解决这个问题………

错误是“无法打开显示器::1100”。你是在远程终端上运行它吗?确保您可以在提示符处键入“firefox”并打开浏览器(这就是Webdriver所做的-在您的系统上打开firefox,然后尝试连接到它)。如果在远程系统上运行,请在远程连接到X display时进行web搜索

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'