使用pytest-selenium插件,ui自动化示例

插件:pytest-selenium

可通过pip命令在终端安装插件,pytest-selenium插件创建了浏览器实例,可以直接使用浏览器实例

测试网站:百度

浏览器:谷歌

目的:使用pytest-selenium插件,在输入框输入查询信息后,保存查询结果到html文件

pytest --driver Chrome --driver-path=./chromedriver.exe test_baidu.py -v -s

谷歌浏览器及对应驱动器下载链接: https://pan.baidu.com/s/10s3DnX3s9GzUxCi0hDih2w?pwd=3ifp 提取码: 3ifp

相关推荐
工会主席-阿冰4 小时前
pytest,ui自动化示例
pytest·ui自动化
认真的小羽❅1 天前
Python Selenium 超详细新手教程:从零开始掌握浏览器自动化
selenium·测试工具·自动化
我一定会有钱2 天前
pytest基础
python·测试工具·测试用例·pytest
西游音月2 天前
(6)pytest+Selenium自动化测试-测试用例编写
selenium·测试用例·pytest
Wpa.wk2 天前
自动化测试 - 文件上传 和 弹窗处理
开发语言·javascript·自动化测试·经验分享·爬虫·python·selenium
mike04122 天前
Eclipse+maven+selenium自动化测试用例入门
selenium·eclipse·maven
啊巴矲3 天前
小白从零开始勇闯人工智能:爬虫初级篇(Selenium库)
爬虫·selenium·测试工具
尼罗河女娲3 天前
【获取WebSocket】使用 Playwright 监听 Selenium 自动化测试中的 WebSocket 消息(一)
websocket·网络协议·selenium
尼罗河女娲3 天前
【测试开发】Selenium + Chrome 自动化中常用 ChromeOptions 参数说明(实践总结)
chrome·selenium·自动化