Bence asked had the same issue here:
Fortunately given solution worked for him but it didn’t work for me.
I wonder if different chrome option arguments and/or experimental options affect the other option arguments with selenium chromedriver.
Here my current initialization
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
selenium_path = "path/to/file/chromedriver.exe"
ser = Service(selenium_path)
op = webdriver.ChromeOptions()
op.add_experimental_option('prefs', {
'profile': {
'content_settings': {
'exceptions': {
'clipboard': {
'https://someprivatewebsite/,*': {
'expiration': 0,
'last_modified': 1323640820415,
'setting': 1
}
}
}
}
}
})
op.add_argument("--disable-usb-keyboard-detect")
op.add_argument("--disable-search-engine-choice-screen") # added to solve the issue
op.add_experimental_option('excludeSwitches', ['enable-logging'])
op.add_argument('--log-level=3')
wd = webdriver.Chrome(service=ser, options=op)
When I start chromedriver with selenium it still open choose default search engine dialog.