使用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

相关推荐
007张三丰14 小时前
软件测试专栏(11/20):测试框架开发:pytest深度解析与插件体系
运维·服务器·自动化测试·pytest·测试框架
我的xiaodoujiao1 天前
API 接口自动化测试详细图文教程学习系列25--继续处理testCase中的数据
python·学习·测试工具·pytest
深蓝电商API1 天前
Playwright vs Puppeteer vs Selenium 2026终极对比
爬虫·selenium·puppeteer·playwright
xiaobai1782 天前
pytest+playwright实现UI自动化(4)-上夹具fixture
ui·自动化·pytest·playwright
弹简特2 天前
【接口自动化】02-Pytest固件fixture核心机制与Allure企业级报告实战
自动化·pytest·测试
ClouGence3 天前
不用写 Selenium,零代码的 UI 自动化测试工具!
selenium·测试
弹简特4 天前
【接口自动化】01-pytest详解、pytest执行逻辑、pytest参数、配置文件和pytest标记
自动化·pytest
香辣西红柿炒蛋4 天前
pytest框架介绍
python·pytest
@zulnger5 天前
selenium 操作浏览器
前端·javascript·selenium
@zulnger5 天前
WebDriver API及对象识别技术
笔记·python·selenium