# coding=utf-8
from selenium import webdriver
import time
driver = webdriver.Chrome(r"C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe")
driver.get('https://www.baidu.com/')
# ----------------------------------
driver.get_screenshot_as_file('shot.png')
ele = driver.find_element_by_id('su')
ele.screenshot('e:\\button.png')
# ----------------------------------
input('press any key to quit...')
driver.quit() # 浏览器退出
相关文章
- 03-31截屏
- 03-31win10自带截屏操作
- 03-31Labview学习之路(二)截屏时弹出来的窗口总是关闭
- 03-31FFmpeg截屏录制:使用哪些编解码器?
- 03-31重温 Win32 API ----- 截屏指定窗体并打印
- 03-31截屏代码
- 03-31使用PHANTOMJS对网页截屏
- 03-31win7自带截屏便签 打开命令
- 03-31TESTNG重试、截屏、监听
- 03-31pyqt5 截屏