这个是python+selenium之截图处理
#coding=utf-8
from selenium import webdriver
import time
driver = webdriver.Firefox()
driver.get('http://www.baidu.com')
driver.find_element_by_id("kw").send_keys("selenium")
driver.find_element_by_id("su").click()
time.sleep(4)
#等等4秒
driver.get_screenshot_as_file("C:\\Users\\Administrator\\Desktop\\baidu_img.jpg")
driver.quit()
#关闭浏览器