selenium + python automation 86 - Chrome is being controlled by automated software

problem appear

1. Start the browser with selenium and it appears 'Chrome is being controlled by automatic software'

2. If you don't want to see this annoying prompt, just add a configuration when you start the browser

disable-infobars

1. Add a parameter to the browser configuration and ignore this warning message

option = webdriver.ChromeOptions()
option.add_argument('disable-infobars')

Reference Code

# coding:utf-8
from selenium import webdriver

#Add startup configuration 
option = webdriver.ChromeOptions()
option.add_argument('disable-infobars')

#Open chrome browser driver = webdriver.Chrome( chrome_options 
= option)
driver.get("https://www.cnblogs.com/yoyoketang")
print(driver.title)

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325339775&siteId=291194637