摘要: 1、运行脚本所有代码 pytest 01.py 2、只显示执行结果 pytest -q 01.py 若执行全部通过时 若执行有不通过时 阅读全文
posted @ 2021-05-26 11:45 SpriteGirl 阅读(245) 评论(0) 推荐(0)
摘要: 1.安装 pip install pytest 2.插件 测试顺序随机 pip install pytest-randomly 分布式测试 pip install pytest-xdist 出错立即返回 pip install pytest-instafail 3.测试报告 计算pytest执行覆盖 阅读全文
posted @ 2021-05-25 15:06 SpriteGirl 阅读(110) 评论(0) 推荐(0)
摘要: 1、weditor界面 1、几种元素定位 d(resourceId="com.tencent.qqlite:id/mainlogindropdown").click() d(className='android.widget.TextView').click() d(text='联系人').clic 阅读全文
posted @ 2021-05-20 19:08 SpriteGirl 阅读(496) 评论(0) 推荐(0)
摘要: 1、安装uiautomator2 pip install --pre uiautomator2 pip install pillow 2、初始化,部署相关的守护进程 设备上会安装uiautomator-test.apk python -m uiautomator2 init 3、连接手机 (1)wi 阅读全文
posted @ 2021-05-20 18:59 SpriteGirl 阅读(136) 评论(0) 推荐(0)
摘要: 报错代码: AttributeError:module “uiautomator2” has no attribute “connect” 4种解决方法: 1、未安装则点击安装,有时需要重启生效 2、检查模块单词,输入是否正确 3、文件夹或包名是否与导入模块相同,导致导入错误 4、Python环境变 阅读全文
posted @ 2021-05-20 17:44 SpriteGirl 阅读(588) 评论(0) 推荐(0)
摘要: 1.需求:循环点击首页6个tag 2.找到一组元素相同点 3.实现 1 # -*- coding:utf-8 -* 2 import time 3 from selenium import webdriver 4 5 driver = webdriver.Chrome() 6 driver.get( 阅读全文
posted @ 2021-05-20 15:42 SpriteGirl 阅读(4356) 评论(0) 推荐(0)
摘要: 1、启动Appium,启动检查器会话 2、查看应用包名和启动的activity名称,打开cmd输入命令: aapt dump badging <apk绝对路径>appActivity:launchable-activity: name=''appPackage:package: name='' 3、 阅读全文
posted @ 2021-05-19 18:34 SpriteGirl 阅读(181) 评论(0) 推荐(0)
摘要: 1 # coding: utf-8 2 import uiautomator2 as u2 3 4 5 def main(): 6 d = u2.connect('127.0.0.1:5555') 7 # 启动app并获取session 8 app = d.session("<package nam 阅读全文
posted @ 2021-05-19 18:30 SpriteGirl 阅读(86) 评论(0) 推荐(0)
摘要: 一、元素定位 find_element_by_id find_element_by_name find_element_by_class_name find_element_by_xpath() find_element_by_css_selector() find_element_by_tag_n 阅读全文
posted @ 2021-05-19 12:09 SpriteGirl 阅读(212) 评论(0) 推荐(0)
摘要: 1、打开访达,切换至应用程序 2、选择微信,点击复制 3、点击微信副本,点击显示包内容,启动微信,进入以下路径后打开微信,登录小号即可 /Applications/微信的副本.app/Contents 阅读全文
posted @ 2021-05-18 23:07 SpriteGirl 阅读(290) 评论(0) 推荐(0)