Selecting default search engine is needed for Chrome version 127
Asked Answered
C

3

20

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?

Camus answered 24/7, 2024 at 9:0 Comment(0)
C
48

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")
Chevy answered 24/7, 2024 at 12:5 Comment(0)
D
21

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)
Darryl answered 24/7, 2024 at 12:22 Comment(0)
I
1

If you are using protractor or webdriver.io (wdio) you can enter the config in a way like that:

capabilities: [  
  {  
    'browserName': 'chrome',  
    'goog:chromeOptions': {  
      args: ['--disable-search-engine-choice-screen'],  
    },  
  },  
],  
Impregnate answered 2/8, 2024 at 11:8 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.