appium / appium/java-client

Inconsistent Input Behavior with PointerInput on iOS 17 using Appium Java Client 8.5.0

Open
#2,072 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.3k
Forks
752
Avg merge
6d 21h
Merged PRs (30d)
8

Description

Description

I am currently working with iOS 17 and the Appium Java Client version 8.5.0. My goal is to enter three numbers into a numeric field by simulating key presses using the PointerInput class.

Here's the scenario: I'm attempting to use the keyboard to click the numbers 1, 2, and 3, which correspond to the following coordinates on the screen:

  • Number 1: Button at position (0,561)
  • Number 2: Button at position (125,561)
  • Number 3: Button at position (262,561)

However, I'm experiencing inconsistent input behavior. Instead of obtaining the expected sequence of '123', the output I'm getting is '11122'. This occurs despite having experimented with different durations for the pauses between inputs.

No matter how I adjust the pauses, there seems to be no improvement, and the issue persists where the input is erratic and includes more numbers than intended. It's unclear whether the issue lies with the PointerInput implementation or if there's a specific iOS 17 interaction that I'm not accounting for.

Code

public void fasterPINLogin(String numbersText) {
    PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, "finger");
    Sequence tap = new Sequence(finger, 0);

    if (isIOS()) {
        clicks(finger, tap,0,561);
        clicks(finger, tap,128,561);
        clicks(finger, tap,262,561);
        iosDriver.perform(List.of(tap));
    }
}

private void clicks(PointerInput finger, Sequence tap, int x, int y) {
    tap.addAction(finger.createPointerMove(ofMillis(10), PointerInput.Origin.viewport(), x, y));
    tap.addAction(finger.createPointerDown(LEFT.asArg()));
    tap.addAction(new Pause(finger, ofMillis(500)));
    tap.addAction(finger.createPointerUp(LEFT.asArg()));
    tap.addAction(new Pause(finger, ofMillis(500)));
}`

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior in fasterPINLogin using the PointerInput and Sequence actions in clicks, then inspect the iosDriver.perform call and the reported coordinates on iOS 17. Compare the resulting input with the intended 123 sequence and determine whether the behavior is in the Java client or the iOS interaction; done means the cause is identified and a focused fix or documented limitation is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, java
Domain
mobile, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.