Providing webdriver theme function: save_screenshot (), used to intercept the current window
from the Selenium Import webdriver Driver = webdriver.Chrome () driver.get ( " http://www.baidu.com " ) # interception of the current window, specify the location to save the screenshot picture driver.save_screenshot ( " ./baidu_img.png " )