Python 使用Selenium打开Splinter浏览器

Python 使用Selenium打开Splinter浏览器,python,google-chrome,selenium,web,splinter,Python,Google Chrome,Selenium,Web,Splinter,当我为Chrome启动Splitter浏览器对象时,我会看到一条黄色横幅,上面写着“您正在使用一个不受支持的命令行标志…”。我找到了一种使用selenium消除这种情况的方法 browser = Browser('chrome') options = webdriver.ChromeOptions() options.add_experimental_option("excludeSwitches", ["ignore-certificate-errors"]) browser = webdri

当我为Chrome启动Splitter浏览器对象时,我会看到一条黄色横幅,上面写着“您正在使用一个不受支持的命令行标志…”。我找到了一种使用selenium消除这种情况的方法

browser = Browser('chrome')
options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["ignore-certificate-errors"])
browser = webdriver.Chrome(chrome_options=options)

正如你所见,它实际上启动了浏览器两次,但我只希望Chrome弹出一次。有没有办法使用Selenium启动Splinter对象的浏览器?

我没有找到任何方法。我正在使用此修补程序的自定义selenium版本

现在我能做到了

from selenium.webdriver.chrome.options import Options
from splinter import Browser

options = Options()
options.add_argument('test-type')
browser = Browser('chrome', options=options)

我将尝试提出拉请求,抱歉,但以前从未这样做过

对不起,为什么不仅仅是options=webdriver.ChromeOptions()options.add_experimental_option(“excludeSwitches”,“忽略证书错误”])browser=webdriver.Chrome(Chrome_options=options),我的意思是没有browser=browser('Chrome')对不起,有一个输入错误。最后一行应该是:browser.driver=webdriver.Chrome(Chrome\u options=options)。我想实例化一个Splinter对象,而不是Selenium对象。