Hi,
How to use newly provided mobile commands with tap and scroll?
Commands are found here.
But I dont know how to use them with java.
I have used scroll,
//Swipe and load content
JavascriptExecutor js = (JavascriptExecutor) driver;
HashMap<String, String> scrollObject = new HashMap<String, String>();
scrollObject.put("direction", "left");
//scrollObject.put("element", ((RemoteWebElement)).getId());
js.executeScript("mobile: swipe", scrollObject);
And for scroll,
driver.executeScript("mobile", "scroll", "direction" , "down");
With tap also,
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("X", 200);
params.put("Y", 200);
driver.executeScript("mobile: tap", params);