Performing Tap using W3c Sequence and it is taking >500 milliseconds in iPhone with OS 16.3

Hi ,

I was trying to perform Tap using Sequence in W3c actions in the latest java client v8.3.0 and selenium v4.1.0 in an appium project using java.

It is taking more than 500 milliseconds in iPhone with OS Version 16.3, whereas the same piece of code is taking less than 300 milliseconds in iPhone with OS Version 15.4.1.

I am completely blocked with this issue. Can anyone provide solution or alternative for this ASAP.

start first from adding your code. mark area where you start and end record tap time.

@Aleksei

I am using the below code for performing Tap.

public void tap(int x, int y) {
PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, “finger”);
Sequence tap = new Sequence(finger, 1);
tap.addAction(finger.createPointerMove(Duration.ofMillis(0), PointerInput.Origin.viewport(), x, y));
tap.addAction(finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
tap.addAction(finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
((AppiumDriver) driver).perform(Arrays.asList(tap));
}

have same and even a bit delay

                    PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, "finger");
                    Sequence tapSeq = new Sequence(finger, 1);
                    tapSeq.addAction(finger.createPointerMove(Duration.ofMillis(0),
                            PointerInput.Origin.viewport(), point.x, point.y));
                    tapSeq.addAction(finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
                    tapSeq.addAction(finger.createPointerMove(Duration.ofMillis(50),
                            PointerInput.Origin.viewport(), point.x, point.y));
                    tapSeq.addAction(finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));

is all depends on Apple. with one OS it runs faster while another slows down :frowning:

@Aleksei, Can i use the code you have shared , will this reduce the time < 500 ms ?

you can use. no problem. hardly it will reduce. try better disable animation on phone or start driver with reduce motion parameter.

Do we have any better way to perform Tap in IOS with < 300 ms

Did you try to use the click() on the WebElement instead of using the PointerInput?
On my side it was faster.