Hi,
I’m having some issues with interacting with a button. The click method wasn’t working, so I saw that it is actually not clickable. However, manually you can click it. So, I turned my focus into tapping the element using w3c actions. I have trying everything that I have found, however nothing worked. Can you help me?
The element’s attributes from Appium Inspector:
The method that I have implemented in order to tap the element:
public void tapElement(WebElement element){
Rectangle elRect = element.getRect();
Point point = new Point(elRect.x, elRect.y);
PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, "finger");
Sequence tap = new Sequence(finger, 0);
tap.addAction(finger.createPointerMove(Duration.ofMillis(0), PointerInput.Origin.viewport(), point.x, point.y));
tap.addAction(finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
tap.addAction(finger.createPointerMove(Duration.ofMillis(50), PointerInput.Origin.viewport(), point.x, point.y));
tap.addAction(finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
getDriver().perform(List.of(tap));
}