随笔分类 -  appium

摘要:org.openqa.selenium.WebDriverException: unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"FCF1F193B7F00B925 阅读全文
posted @ 2020-05-27 11:23 爱吃橙子 阅读(480) 评论(0) 推荐(0)
摘要:toast是什么?安卓页面上弹出的提示框,这种提示框出现在屏幕上大概3秒左右就会消失。用uiautomatorviewer根本定位不到。 准备环境,Appium版本需要1.6.3以上。 代码 初始化设置 方法 message为toast提示信息 ps:不要去定位toast,尽量不要用element去 阅读全文
posted @ 2018-12-10 17:27 爱吃橙子 阅读(1033) 评论(0) 推荐(1)
摘要:Appium移动测试中有个很重新的组件Appium-Server,它主要用来监听我们的移动设备(真机或模拟器),然后将不同编程语言编写的 appium 测试脚本进行解析,然后,驱动移动设备来运行测试。 Appium-Server下载地址:https://bitbucket.org/appium/ap 阅读全文
posted @ 2018-12-10 17:09 爱吃橙子 阅读(193) 评论(0) 推荐(0)
摘要:1、new AppiumDriver<>(new URL(url), capabilities) 报错 java.lang.NoSuchMethodError:com.google.common.base.Throwables.throwIfUnchecked(Ljava/lang/Throwabl 阅读全文
posted @ 2018-12-03 18:12 爱吃橙子 阅读(356) 评论(0) 推荐(0)
摘要:1、适配各种机型,首先获取整个解锁元素的坐标 2、代码实现 具体实现 阅读全文
posted @ 2018-11-12 15:24 爱吃橙子 阅读(540) 评论(0) 推荐(0)
摘要:滑动API:Swipe(int start x,int start y,int end x,int y,duration) 解释: int start x-开始滑动的x坐标;int start y -开始滑动的y坐标 ;int end x -结束点x坐标;int end y -结束点y坐标; dur 阅读全文
posted @ 2018-10-29 16:42 爱吃橙子 阅读(948) 评论(0) 推荐(0)
摘要:1、创建监听器类TestNGListener,重写onTestFailure方法,里面定义了 监听的driver ,截图文件路径和名称 2、driver的来源 3、配置监听器 有两种配置方法 (1)有两种配置方法在需要捕捉的类上方 (2)在testng.xml里配置监听器 两种方式的差别在于,类上方 阅读全文
posted @ 2018-06-28 18:11 爱吃橙子 阅读(1953) 评论(0) 推荐(0)