当前位置:网站首页>Selenium saves elements as pictures
Selenium saves elements as pictures
2022-06-26 15:41:00 【nongcunqq】
driver = webdriver.Chrome( executable_path=CHROME_DRIVER_PATH)
def login():
driver.get(url_index)
wait = WebDriverWait(driver, 60)
wait.until(EC.visibility_of_element_located((By.XPATH, '//*[@id="Form1"]/div[3]/table/tbody/tr[3]/td[1]/img')))
captcha_elm = driver.find_element(by=By.XPATH, value='//*[@id="Form1"]/div[3]/table/tbody/tr[3]/td[1]/img')
png_path = '1.png'
with open(png_path, 'wb') as file:
file.write(captcha_elm.screenshot_as_png)
Reference resources
https://stackoverflow.com/questions/17361742/download-image-with-selenium-python
边栏推荐
- HW安全响应
- AUTO sharding policy will apply DATA sharding policy as it failed to apply FILE sharding policy
- Seurat to h5ad summary
- How to handle 2gcsv files that cannot be opened? Use byzer
- 反射修改final
- Function: crypto JS encryption and decryption
- Unity C # e-learning (10) -- unitywebrequest (1)
- 【TcaplusDB知识库】TcaplusDB系统管理介绍
- [file] VFS four structs: file, dentry, inode and super_ What is a block? difference? Relationship-- Editing
- 如何配置使用新的单线激光雷达
猜你喜欢

【问题解决】新版webots纹理等资源文件加载/下载时间过长
![[tcapulusdb knowledge base] Introduction to tcapulusdb general documents](/img/7b/8c4f1549054ee8c0184495d9e8e378.png)
[tcapulusdb knowledge base] Introduction to tcapulusdb general documents

2Gcsv文件打不开怎么处理,使用byzer工具

刷题笔记(十九)--二叉树:二叉搜索树的修改与构造
![[applet practice series] Introduction to the registration life cycle of the applet framework page](/img/82/5a9219a7c2ee211180cc4b2d138204.png)
[applet practice series] Introduction to the registration life cycle of the applet framework page

HW safety response

Keil4 opens the single-chip microcomputer project to a blank, and the problem of 100% program blocking of cpu4 is solved
![[tcapulusdb knowledge base] tcapulusdb system user group introduction](/img/7b/8c4f1549054ee8c0184495d9e8e378.png)
[tcapulusdb knowledge base] tcapulusdb system user group introduction

【TcaplusDB知识库】TcaplusDB运维单据介绍

HR export data Excel VBA
随机推荐
[CEPH] Lock Notes of cephfs
Lexin AWS IOT expresslink module achieves universal availability
Inaccurate data accuracy in ETL process
[tcapulusdb knowledge base] tcapulusdb OMS business personnel permission introduction
Ansible自动化的运用
selenium chrome 禁用js 禁用图片
Secure JSON protocol
【ceph】CephFS 内部实现(四):MDS是如何启动的?--未消化
【ceph】CephFS 内部实现(三):快照
feil_ The working directory on the left of uvission4 disappears
Is it safe to buy stocks and open accounts through the QR code of the securities manager? Want to open an account for stock trading
HW安全响应
Unity C # e-learning (VIII) -- www
golang 1.18 go work 使用
【ceph】cephfs的锁 笔记
【ceph】CephFS 内部实现(二):示例--未消化
还存在过有键盘的kindle?
CNN优化trick
效率超级加倍!pycharm十个小技巧就是这么神
Summer camp is coming!!! Chongchongchong