All of my Selenium scripts are raising errors after Chrome updated to version 127 because I always have to select a default search engine when the browser is being launched.
I use ChromeDriver 127.0.6533.72.
How to fix it?
You need to add this Chrome Option to disable the 'choose your search engine' screen:
options.addArguments("--disable-search-engine-choice-screen");
If you are using selenium with Python, you'll have to use:
options.add_argument("--disable-search-engine-choice-screen")
David's solution worked for me. You can add the arguments like so:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument("--disable-search-engine-choice-screen")
driver = webdriver.Chrome(options=chrome_options)
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