TA的每日心情 | 无聊 4 天前 |
---|
签到天数: 530 天 连续签到: 2 天 [LV.9]测试副司令
|
1测试积点
问题:
ios 模拟器 执行滑动 看不到效果呢?求教。
- <font face="微软雅黑" size="3">// final JavascriptExecutor js = (JavascriptExecutor) remoteWebDriver;
- //
- // final HashMap swipeObj = new HashMap();
- // swipeObj.put("startX", 0.0);
- // swipeObj.put("startY", 100.0);
- // swipeObj.put("endX", 0.0);
- // swipeObj.put("endY", 400.0);
- // swipeObj.put("duration", 1.0);
- // // 拖动
- // for (int i = 0; i < 2; i++) {
- // js.executeScript("mobile: swipe", swipeObj);
- //
- // }
- // TimeUnit.SECONDS.sleep(20);
- final JavascriptExecutor js = (JavascriptExecutor) remoteWebDriver;
- final Map scrollObject = new HashMap();
- scrollObject.put("direction", "down");
- System.out.println("Scroll object:" + scrollObject.size());
- for (int i = 0; i < 1; i++) {
- js.executeScript("mobile: scroll", scrollObject);
- }
- </font>
复制代码
|
|