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

相关推荐
影sir16 小时前
Selenium常用函数(窗口与弹窗)
selenium·测试工具
写出高质量的博客2 天前
Selenium常用方法
selenium·测试工具
旦莫2 天前
一个完美的AI测试Agent应该是什么样的
人工智能·python·测试开发·pytest·ai测试
我的xiaodoujiao3 天前
API 接口自动化测试详细图文教程学习系列20--结合Pytest框架使用
python·学习·测试工具·pytest
测试员周周3 天前
【AI测试路线图2】功能测试转 AI 测试:4~5 个月,一条最稳的路
开发语言·人工智能·python·功能测试·测试工具·单元测试·pytest
我的xiaodoujiao3 天前
API 接口自动化测试详细图文教程学习系列19--添加封装其他的方法
开发语言·python·学习·测试工具·pytest
Maydaycxc3 天前
企业内网 RPA 离线部署实践:从选型到落地的完整方案
运维·chrome·python·selenium·自动化·rpa
小卓(friendhan2005)4 天前
基于 Pytest + Requests + Allure 的博客系统API自动化测试实践
pytest
小卓(friendhan2005)4 天前
基于 Pytest + Selenium + Allure 的博客系统自动化测试实践
selenium·测试工具·pytest