我在 ios 7.x 的自动化测试时,发现如下的代码不能够进行滑动下拉刷新操作,反而是进行了点击操作,请大神解答,谢谢。

public void swipeTest() throws InterruptedException {
     String js_snippet = "mobile: swipe";
     JavascriptExecutor js = (JavascriptExecutor) driver;
     HashMap<String, Double> swipeObject = new HashMap<String, Double>();
     swipeObject.put("startx",75.0);
     swipeObject.put("starty",500.0);
     swipeObject.put("endx",75.0);
     swipeObject.put("endy",0.0);
     swipeObject.put("tapCount",1.0);
     swipeObject.put("duration",5.0);
     js.executeScript(js_snippet, swipeObject);
     System.out.println(js_snippet); 
 }


↙↙↙阅读原文可查看相关链接,并与作者交流