I’m at the moment working with iOS 17 and the Appium Java Consumer model 8.5.0. My purpose is to enter three numbers right into a numeric subject by simulating key presses utilizing the PointerInput class.
This is the state of affairs: I am trying to make use of the keyboard to click on the numbers 1, 2, and three, which correspond to the next coordinates on the display screen:
No 1: Button at place (0,561)
Quantity 2: Button at place (125,561)
Quantity 3: Button at place (262,561)
Nonetheless, I am experiencing inconsistent enter conduct. As an alternative of acquiring the anticipated sequence of ‘123’, the output I am getting is ‘11122’. This happens regardless of having experimented with completely different durations for the pauses between inputs.
Irrespective of how I modify the pauses, there appears to be no enchancment, and the problem persists the place the enter is erratic and contains extra numbers than meant. It is unclear whether or not the problem lies with the PointerInput implementation or if there is a particular iOS 17 interplay that I am not accounting for.
public void fasterPINLogin(String numbersText) {
PointerInput finger = new PointerInput(PointerInput.Variety.TOUCH, "finger");
Sequence faucet = new Sequence(finger, 0);
if (isIOS()) {
clicks(finger, faucet,0,561);
clicks(finger, faucet,128,561);
clicks(finger, faucet,262,561);
iosDriver.carry out(Record.of(faucet));
}
}
personal void clicks(PointerInput finger, Sequence faucet, int x, int y) {
faucet.addAction(finger.createPointerMove(ofMillis(10),
PointerInput.Origin.viewport(), x, y));
faucet.addAction(finger.createPointerDown(LEFT.asArg()));
faucet.addAction(new Pause(finger, ofMillis(500)));
faucet.addAction(finger.createPointerUp(LEFT.asArg()));
faucet.addAction(new Pause(finger, ofMillis(500)));
}`