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