我使用硒与python和铬/ chromedriver。我想删除传递给chrome的开关(例如--full-memory-crash-report),但到目前为止我只能找到如何添加更多开关。删除通过selenium/chromedriver传递给chrome的参数
我的当前设置:
from selenium import webdriver
driver = webdriver.Chrome(executable_path="/path/to/chromedriver")
driver.get(someurl)
据我了解这可以用来添加参数:
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument("--some-switch")
driver = webdriver.Chrome(chrome_options=chrome_options)
那么,我该如何摆脱默认参数或清除所有默认参数清理并只传递一个自定义列表?
这并不为我工作。参数已经是空的。我可以删除/禁用chromedriver设置的开关。 – 2017-03-13 06:58:18