Selenium configuration under Chrome

Address: https://peter.sh/experiments/chromium-command-line-switches/

chrome_options.add_argument ( '- headless') # endless mode
chrome_options.add_argument ( '- disable-gpu' ) # disable GPU acceleration
chrome_options.add_argument ( '- start-maximized' ) # browser maximize
chrome_options.add_argument ( '--window-size = 1280x1024' ) # set the browser resolution (window size)
chrome_options.add_argument ( 'log-Level =. 3')
#info (default) = 0
#warning. 1 =
#LOG_ERROR = 2
#LOG_FATAL 3 =

chrome_options.add_argument ( '- user-agent = ""') # Set-- Agent request header the User
chrome_options.add_argument ( '- disable-infobars') # disable the browser being controlled automation program prompts
chrome_options.add_argument ( '--incognito') # stealth mode (incognito)
chrome_options.add_argument ( '- hide-scrollbars') # scroll bar is hidden, to deal with some special pages
chrome_options.add_argument ( '- disable-javascript' ) # javascript disabled
chrome_options.add_argument ( '- blink-settings = imagesEnabled = false') # image is not loaded, the lifting speed

chrome_options.add_argument ( '- ignore-certificate- errors') # disable extensions and achieve maximized window
chrome_options.add_argument ( '- disable-Software-rasterizer')
chrome_options.add_argument ( '- disable-Extensions')

 

Guess you like

Origin www.cnblogs.com/xmlbw/p/11281124.html