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

相关推荐
Lary_c1 天前
【测试自动化】pytest + Allure 完整学习指南
运维·自动化·pytest
念越1 天前
自动化测试入门指南:Selenium环境搭建+第一个实战案例
自动化测试·selenium·测试工具·蓝桥杯
小邓睡不饱耶1 天前
实战教程:基于Selenium+BeautifulSoup爬取易车网新能源汽车销量数据
selenium·测试工具·beautifulsoup
sheepfagdng1 天前
Python-web自动化-selenium(2)
运维·selenium·自动化
虚幻如影1 天前
Selenium 自动化测试中 Chrome 浏览器弹出“您的连接不是私密连接”
chrome·selenium·测试工具
sheepfagdng2 天前
python-web自动化-selenium(1)
selenium·测试工具
qq_427940342 天前
java-UI自动化selenium+TestNG
java·selenium·自动化
Looooking3 天前
Python 之自动下载更新 selenium 驱动 chromedriver
python·selenium·chromedriver
我的xiaodoujiao3 天前
API接口自动化测试详细图文教程学习系列1--序章
python·学习·pytest
我的xiaodoujiao4 天前
API 接口自动化测试详细图文教程学习系列2--相关Python基础知识
python·学习·测试工具·pytest