Splinter无头选项被拒绝

时间:2017-09-17 11:40:04

标签: python python-3.x firefox headless-browser splinter

在splinter中使用Browser对象时出现此错误:

>>> from splinter import Browser

>>> brow = Browser('firefox', headless=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/splinter/browser.py", line 63, in Browser
    return driver(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/splinter/driver/webdriver/firefox.py", line 49, in __init__
    timeout=timeout, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'headless'
__init__() got an unexpected keyword argument 'headless'

我做错了什么?

1 个答案:

答案 0 :(得分:1)

问题是只有从firefox 55开始支持无头。