无法滚动页面

时间:2016-01-29 05:07:28

标签: automation

以下两种鳕鱼对我不起作用

在这里输入代码

JavascriptExecutor js = (JavascriptExecutor) driver;
            HashMap<String, String> scrollObject = new HashMap<String, String>();
            scrollObject.put("direction", "down");
            js.executeScript("mobile: scroll", scrollObject);

OR

JavascriptExecutor js = (JavascriptExecutor) driver;
         HashMap<String, Double> scrollObject = new HashMap<String, Double>();
         scrollObject.put("startx", 200.00);
         scrollObject.put("starty", 200.00);
         scrollObject.put("endx", 200.00);
         scrollObject.put("endy", 300.00);
         js.executeScript("mobile: scroll", scrollObject);

错误发生 - ERROR运行Appium命令:string不是函数 命令持续时间或超时:13毫秒

0 个答案:

没有答案