当前位置:网站首页>selenium将元素保存为图片
selenium将元素保存为图片
2022-06-26 15:16: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)
参考
https://stackoverflow.com/questions/17361742/download-image-with-selenium-python
边栏推荐
- Comparative analysis of restcloud ETL and kettle
- 小程序:uniapp解决 vendor.js 体积过大的问题
- [tcapulusdb knowledge base] tcapulusdb doc acceptance - create business introduction
- Redis cluster re fragmentation and ask command
- Unity C # e-learning (VIII) -- www
- One click analysis hardware /io/ national network performance script (strong push)
- Is it safe to open a new bond registration account? Is there any risk?
- 一键分析硬件/IO/全国网络性能脚本(强推)
- 【TcaplusDB知识库】TcaplusDB单据受理-创建游戏区介绍
- 学习内存屏障
猜你喜欢

【ceph】cephfs caps简介

ETL过程中数据精度不准确问题
![[tcapulusdb knowledge base] Introduction to tcapulusdb general documents](/img/7b/8c4f1549054ee8c0184495d9e8e378.png)
[tcapulusdb knowledge base] Introduction to tcapulusdb general documents

Smoothing data using convolution

Utilisation d'abortcontroller
![[tcapulusdb knowledge base] tcapulusdb doc acceptance - transaction execution introduction](/img/7c/25a88f46e02cebd2e003b9590b9c13.png)
[tcapulusdb knowledge base] tcapulusdb doc acceptance - transaction execution introduction

Evaluate:huggingface评价指标模块入门详细介绍

数据库-序列

数据库-视图

How to handle 2gcsv files that cannot be opened? Use byzer
随机推荐
RestCloud ETL抽取动态库表数据实践
【TcaplusDB知识库】TcaplusDB单据受理-事务执行介绍
One click GCC script installation
一键分析硬件/IO/全国网络性能脚本(强推)
数据库-完整性约束
一键安装gcc脚本
[CEPH] cephfs internal implementation (IV): how is MDS started-- Undigested
【TcaplusDB知识库】TcaplusDB数据构造介绍
shell脚本多进程并发写法实例(高阶修炼)
JS handwritten bind, apply, call
整理了一批脚本标准的函数模块(2021版)
Evaluate:huggingface评价指标模块入门详细介绍
MongoDB系列之Window环境部署配置
【ceph】CephFS 内部实现(三):快照
【TcaplusDB知识库】TcaplusDB单据受理-创建游戏区介绍
Vsomeip3 dual computer communication file configuration
评价——TOPSIS
Optimizing for vectorization
IDEA本地代理后,无法下载插件
JS events