I tried to migrate ChromeOptions settings from Selenium, but I get an unknown error. Is there a list of all supported ChromeOptions?
Or a way to transfer these?
options = ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-gpu')
options.add_argument('--disable-extensions')
options.add_argument('--disable-dev-shm-usage')
options.add_argument("--disable-blink-features")
options.add_argument('--disable-application-cache')
options.add_argument("--disable-blink-features=AutomationControlled")
options.add_argument('user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36')
options.add_experimental_option('useAutomationExtension', False)
options.add_experimental_option('excludeSwitches', ['enable-automation', 'enable-logging'])
options.add_experimental_option('prefs', {"profile.managed_default_content_settings.images": 2, 'disk-cache-size': 0})
additional_options = {'useAutomationExtension': False, 'excludeSwitches': ['enable-automation', 'enable-logging'], 'prefs': {"profile.managed_default_content_settings.images": 2, 'disk-cache-size': 0}}
args=[
'--headless',
'--no-sandbox',
'--disable-gpu',
'--disable-extensions',
'--disable-dev-shm-usage',
'--disable-blink-features',
'--disable-application-cache',
'--disable-blink-features=AutomationControlled',
'user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36'
]
kwargs = {'goog:chromeOptions': dict(additional_options=additional_options, args=args)}
browser = browsers.Chrome(**kwargs)
I tried to migrate ChromeOptions settings from Selenium, but I get an unknown error. Is there a list of all supported ChromeOptions?
Or a way to transfer these?