I'm using selenium with python and chromium / chromedriver. I want to REMOVE switches passed to chrome (e.g. --full-memory-crash-report), but so far I could only find out how to add further switches.
My current setup:
from selenium import webdriver
driver = webdriver.Chrome(executable_path="/path/to/chromedriver")
driver.get(someurl)
As far as I understand this can be used to add arguments:
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument("--some-switch")
driver = webdriver.Chrome(chrome_options=chrome_options)
So, how do I get rid of default arguments or wipe all default arguments clean and pass only a custom list?
It helped me:
options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["test-type"])
options.add_argument("--incognito")
driver = webdriver.Chrome(options=options)
Found solution here https://help.applitools.com/hc/en-us/articles/360007189411--Chrome-is-being-controlled-by-automated-test-software-notification
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With