Hi,
I’m trying to increase Appium java client from 7.x to 8.x and I’m having trouble understanding how I can make a simple click on coordinates X and Y and passing duration of that click?
I could find good examples on how to make complex actions, while I have no idea how to make a simple click.
As an example, I created a scroll action like this:
PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, “finger”);
Sequence scroll = new Sequence(finger, 0);
scroll.addAction(finger.createPointerMove(Duration.ofMillis(0), PointerInput.Origin.viewport(), startX, startY));
scroll.addAction(finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
scroll.addAction(finger.createPointerMove(Duration.ofMillis(timeInMillis), PointerInput.Origin.viewport(), endX, endY));
scroll.addAction(finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
driver.perform(Arrays.asList(scroll));
How can I make a simple click on X and Y with duration?
I found this piece of code here: Appium Pro: iOS-Specific Touch Action Methods
Map<String, Object> args = new HashMap<>();
args.put(“x”, 2);
args.put(“y”, 2);
driver.executeScript(“mobile: tap”, args);
… but as I understand, this is iOS specific + the Duration is missing. How to achieve the same on Android? Where is this documented?
Any help very much appreciated.