![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
web自动化(python+selenium)
python+selenium
kodline
这个作者很懒,什么都没留下…
展开
-
python+selenium二:浏览器驱动
环境准备 1.根据浏览器版本下载对应版本驱动,驱动下载地址: chrome:http://chromedriver.storage.googleapis.com/index.html firefox:https://github.com/mozilla/geckodriver/releases 2.将浏览器驱动放在python.exe的目录,一般是python环境根目录 浏览器配置 静默运行,加入参数实现 from selenium import webdriver global dr # 开启静默运行原创 2021-06-17 22:38:52 · 1356 阅读 · 0 评论 -
python+selenium一:脚本框架介绍
前段时间公司一个项目做web自动化,刚结束来做下随笔总结。 采用技术是主流的python+selenium+unittest,脚本框架相对简单,设计思想主要有: PO模式 selenium unittest测试框架 数据驱动 下图为框架结构: 数据:测试数据,可用ddt装饰器、xml文件、excel(不建议,不方便维护)等实现,笔者在实际项目中用得较多的是ddt和xml文件,或者像元素定位方式这类数据,用py文件在page页面中直接管理 工具配置:获取浏览器驱动、日志类、操作中间件(如mysql、el原创 2021-06-16 22:05:46 · 1493 阅读 · 0 评论