随笔分类 -  GUI自动化测试

pythonGUI自动化:selenium+unittest+ddt+内反射+htmltestrunner数据驱动框架
摘要:一、xc_case:存放测试用例脚本,xc_common:存放自动化测试脚本,xc_datas:存放测试数据和配置文件,xc_driven:存放浏览器驱动脚本,xc_report:存放生成的报 告,xc_tools:存放一些工具,get_main.py为执行程序 注:xc_common里的脚本为每个 阅读全文
posted @ 2020-01-09 21:11 badbadboy 阅读(543) 评论(0) 推荐(0)
pythonGUI自动化:常见问题
摘要:1. html的class属性,class="light-chip alternate-fakebox show-fakebox-icon"的中间存在空格,表示有三个属性名称,定位时选取一个就好,不然无法定位到 阅读全文
posted @ 2020-01-08 20:44 badbadboy 阅读(300) 评论(0) 推荐(0)
pythonGUI自动化:绕过验证码登录
摘要:1. 获取cookies 实现代码如下: import time from selenium import webdriver class cookies_login: wd=webdriver.Chrome() def getCookies(self): wd=self.wd wd.maximiz 阅读全文
posted @ 2020-01-08 19:48 badbadboy 阅读(506) 评论(0) 推荐(0)
pythonGUI自动化:grid兼容性测试
摘要:推荐博文:https://blog.csdn.net/zb455405775/article/details/80652842 阅读全文
posted @ 2020-01-05 20:30 badbadboy 阅读(258) 评论(0) 推荐(0)
pythonGUI自动化:selenium定位元素方式
摘要:单个元素 1. 通过id定位:wd.find_element_by_id() 2. 通过name定位:wd.find_element_by_name() 3. 通过class定位:wd.find_element_by_class_name() 4. 通过tag定位:wd.find_element_b 阅读全文
posted @ 2020-01-05 20:04 badbadboy 阅读(433) 评论(0) 推荐(0)
pythonGUI自动化:selenium常用的操作
摘要:1. 实现代码如下: from selenium import webdriver import time #谷歌浏览器 wd=webdriver.Chrome() #火狐浏览器 #wd=webdriver.Firefox() #IE浏览器 #wd=webdriver.Ie() #窗口最大化 wd. 阅读全文
posted @ 2020-01-05 13:35 badbadboy 阅读(464) 评论(0) 推荐(0)
pythonGUI自动化:selenium环境的搭建
摘要:1. python中安装好selenium包 pip install selenium 2. 查看chrome、firefox、ie的版本 3. 根据浏览器的版本下载对应的driverserver chrome:http://npm.taobao.org/mirrors/chromedriver/ 阅读全文
posted @ 2020-01-04 19:44 badbadboy 阅读(324) 评论(0) 推荐(0)
pythonGUI自动化:uiautomation的常见使用
摘要:一、在web系统GUI自动化测试中,可以用uiautomation进行辅助 二、程序窗口:WindowControl() 按钮:ButtonControl() 文件显示:TextControl() 输入框:EditControl() 三、一般定位的属性有:ClassName、Name、Process 阅读全文
posted @ 2020-01-04 19:30 badbadboy 阅读(16773) 评论(0) 推荐(1)
自动化测试适用场景和难点
摘要:一、适用场景 1. 项目周期够长 2. 需求不再频繁变动 3. 代码复用性高 二、难点 1. 技术要求 2. 稳定的界面或接口 3. 质量意识 4. 通过手工测试熟悉整个系统 阅读全文
posted @ 2020-01-04 12:23 badbadboy 阅读(3448) 评论(0) 推荐(0)
UIAutomation元素识别软件
摘要:通过Python调用UIAutomation库来开发代码时,都会遇到需要识别元素的问题。笔者在这里推荐两款好用的软件:UISpy和Inspect。 一般选用:UISpy UISpy识别元素后,我们需要的属性有:ClassName、Name、ProcessId、AutomationId 阅读全文
posted @ 2019-11-29 19:37 badbadboy 阅读(524) 评论(0) 推荐(0)