JSONObject drag_arg = new JSONObject();
drag_arg.put("fromX",windowWidth/2);
drag_arg.put("fromY",centerY);
drag_arg.put("toX",0);
drag_arg.put("toY",centerY);
drag_arg.put("duration",0.001);
driver.touch("drag",drag_arg);
查看到 drag 日志为
{"actions":[{"duration":"0.001","type":"drag","fromX":"540","toX":"0","fromY":"895","toY":"895"}]}
实际在真机上既有拖动,也会触发长按事件。但我的目的仅仅是拖动,不想触发长按,如何解决呢?