摘要: 一. 使用继承:封装数据驱动框架,包括日志,截图(上传到 allure),录屏 1. 继承、组合 2. 日志 import logging logging.basicConfig(level=logging.INFO) logging.info(f"开始查找元素: args是 {args},kwar 阅读全文
posted @ 2021-01-17 22:18 方园FPP 阅读(613) 评论(0) 推荐(0) 编辑
摘要: 知识点 image1920×1080 227 KB 字节码插桩 pythoninsight.com 3 Assertion rewriting in Pytest part 1: Why it’s needed – Python Insight 3 插桩:对字节码进行修改,植入逻辑,针对的是字节码、 阅读全文
posted @ 2021-01-17 14:50 方园FPP 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 1.用装饰器,制作black黑名单,在黑名单里处理异常:源码在test_frame里的base_page和black_handle里 用闭包:1. black_handle.pydef black_wrapper(fun): def run(*args, **kwargs): basepage = 阅读全文
posted @ 2021-01-10 12:58 方园FPP 阅读(94) 评论(0) 推荐(0) 编辑
摘要: python3环境(建议3.6版本及以上) Python和Pycharm安装指引 29如果不是需要频繁切换python环境的话,不需要安装Pyenv。python安装未勾选添加path的话,需要自己手动将python根目录和python/Script目录配置到环境变量path中pycharm安装(安 阅读全文
posted @ 2021-01-06 16:28 方园FPP 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 1. 九九乘法表: for i in range(1,10): r = '' for j in range(1,i+1): r = r + str(j) + '*' + str(i) + '=' + str(j*i) + ' ' print r 2. 序列实现冒泡排序:arr = [2,9,1,6, 阅读全文
posted @ 2021-01-03 13:56 方园FPP 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 脚本与函数 花括号括起来的一段shell命令 #错误写法 [root@shell.ceshiren.com ~]$ cpu_mem(){top -b -n 1 -d 1 | grep -i aliyundun$ | awk '{print $9,$10}'; } -bash: 未预期的符号 `{to 阅读全文
posted @ 2021-01-02 13:29 方园FPP 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 1. app类里两处封装: 2. 基类 另一种滑动技巧,较灵活: 3.注意踩坑:有的文本里看似就两个字,实际上点进去还有空格,这种可用contains 4. 填写信息页面,处理toast是固定写法,写死的代码 阅读全文
posted @ 2020-12-30 23:46 方园FPP 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 环境:网易木木模拟器 遇到的问题:使用uiautomatorviewer识别模拟器上的控件时,APP为竖屏,但是识别到的图片为横屏 image1319×1010 329 KB 原因:模拟器默认为横屏,只是打开应用时显示为竖屏,uiautomatorviewer识别时,根据分辨率,将app识别为横屏 阅读全文
posted @ 2020-12-27 22:05 方园FPP 阅读(978) 评论(0) 推荐(1) 编辑
摘要: 第一种方法: 可以通过访问:https://chrome.google.com/webstore/detail/selenium-ide/mooikfkahbdckldjjndioackbalphokd?utm_source=chrome-ntp-icon 12 进行安装 第二种方法 第一种方法无法 阅读全文
posted @ 2020-12-27 12:27 方园FPP 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 课堂源码链接 GitHub 53 ceshiren/HogwartsSDET16 53 霍格沃兹测试学院 测试开发16期项目实战. Contribute to ceshiren/HogwartsSDET16 development by creating an account on GitHub. 阅读全文
posted @ 2020-12-27 12:25 方园FPP 阅读(205) 评论(0) 推荐(0) 编辑