Import the webdriver Selenium from # option.add_argument ( '- headless') without a window # mode # option.add_argument (' - start-maximized ') # maximized window option.add_argument (' - window-size = 1024, 768 ') # set the window size option.add_argument (' - disable-infobars' ) # does not appear in the window 'automated testing' tips option.add_argument ( '- blink-settings = imagesEnabled = false') # Do not display photographs drive = webdriver.Chrome (options = option)
Of course, it can also be started again after setting finish, such as
drive.maximize_window() drive.set_window_size(400,300)
……