删除selenium/chromedriver传递给chrome的参数

use*_*007 7 python selenium webdriver selenium-chromedriver selenium-webdriver

我正在使用硒与python和铬/ chromedriver.我想删除传递给chrome的交换机(例如--full-memory-crash-report),但到目前为止我只能找到如何添加更多交换机.

我目前的设置:

from selenium import webdriver
driver = webdriver.Chrome(executable_path="/path/to/chromedriver")
driver.get(someurl)
Run Code Online (Sandbox Code Playgroud)

据我所知,这可以用来添加参数:

from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument("--some-switch")
driver = webdriver.Chrome(chrome_options=chrome_options)
Run Code Online (Sandbox Code Playgroud)

那么,我如何摆脱默认参数或擦除所有默认参数clean并仅传递自定义列表?

Chr*_*dam 1

使用排除开关 chrome 选项。请参阅: https: //sites.google.com/a/chromium.org/chromedriver/capability