Python Splinter browser = Browser() not working



我正在尝试使用split来测试我的Web应用程序。当我尝试执行以下时

>>> from splinter import Browser
>>> browser = Browser()

我得到这个错误。我一直在四处寻找,但不知道该怎么解决。有人能告诉我怎么过去吗?

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/danny/anaconda/lib/python2.7/site-packages/splinter/browser.py", line 63, in Browser
    return driver(*args, **kwargs)
  File "/Users/danny/anaconda/lib/python2.7/site-packages/splinter/driver/webdriver/firefox.py", line 39, in __init__
    self.driver = Firefox(firefox_profile)
  File "/Users/danny/anaconda/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 103, in __init__
    self.binary, timeout)
  File "/Users/danny/anaconda/lib/python2.7/site-packages/selenium/webdriver/firefox/extension_connection.py", line 51, in __init__
    self.binary.launch_browser(self.profile, timeout=timeout)
  File "/Users/danny/anaconda/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 67, in launch_browser
    self._start_from_profile_path(self.profile.path)
  File "/Users/danny/anaconda/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 90, in _start_from_profile_path
    env=self._firefox_env)
  File "/Users/danny/anaconda/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/Users/danny/anaconda/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception

以下是firefox_binary.py中正在抛出的代码:https://github.com/SeleniumHQ/selenium/blob/master/py/selenium/webdriver/firefox/firefox_binary.py#L79-L90

您是否安装了Firefox并正常工作?我也会尝试更新Firefox,以确保它是最新版本。

相关内容

  • 没有找到相关文章

最新更新