If you check the allowed command line arguments for chromium
https://peter.sh/experiments/chromium-command-line-switches/ ,
We see the below flag , this flag is the reason for showing that prompt:
--enable-automation
but there is no option to disable it
But when you investigate chromium options':
https://chromedriver.chromium.org/capabilities
You can see that we have :
excludeSwitches:
List of Chrome command line switches to exclude that ChromeDriver by
default passes when starting Chrome. Do not prefix switches with --.
So the answer is:
options = webdriver.ChromeOptions()
#options.add_argument('--disable-automation')
options.add_experimental_option(
"excludeSwitches", ['enable-automation'])
driver = webdriver.Chrome(options=options);