使用webdriver提供的 save_screenshot 方法:
from selenium import webdriver driver = webdriver.Chrome() driver.get('https://www.duba.com/?f=liebaont') driver.save_screenshot('D:/111.PNG') driver.quit()
图片: