摘要: 参数化 背景:有时候一条case重复测试会相当不方便,所以引入了参数化,这边测试框架使用了pytest,pytest参数化不知道的,可以往前翻,使用装饰器@pytest.mark.parametrize 脚本演示 ch2/ test_param.py @pytest.mark.parametrize 阅读全文
posted @ 2020-08-07 16:12 WANG-X 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 断言 通过find_element 找到元素,判断是否存在 获取通过get_attribute获取对象,判断是否存在 通常使用 assert,可以查看pytest中断言用法 常用的有in , >=, != 可以参考ch2/test_asset.pu PyHamcrest 用法更丰富 pip inst 阅读全文
posted @ 2020-08-07 16:09 WANG-X 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 常用API click: 点击 sendKeys: 输入内容 swipe: 滑动 TouchAction:这也是手势操作 github https://github.com/wangxiao9/appium_demo.git 阅读全文
posted @ 2020-08-07 15:59 WANG-X 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 什么是Toast Android中的Toast是一种简易的消息提示框。 如何识别Toast 使用 xpath 查找 推荐 //*[@class='android.widget.Toast'] (固定这么写) 或者 //*[contains(@text, "xxxxx")] 实现 脚本参考ch2/te 阅读全文
posted @ 2020-08-07 15:56 WANG-X 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 常用定位方法 id Accessibility ID xpath http://appium.io/docs/en/commands/element/find-elements/ id 打开uiautomator view python中寻找id对应的 android的resource-id;iOS 阅读全文
posted @ 2020-08-07 15:48 WANG-X 阅读(271) 评论(0) 推荐(0) 编辑