Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error is reported when tapping nil element #394

Closed
electricbubble opened this issue Oct 9, 2020 · 0 comments · Fixed by #395
Closed

An error is reported when tapping nil element #394

electricbubble opened this issue Oct 9, 2020 · 0 comments · Fixed by #395

Comments

@electricbubble
Copy link

952ed2a#diff-ef2b007ff2cf5811194b985ca21d2a23R63-R65

This snippet of code affects handleTap.

https://github.com/appium/WebDriverAgent/blob/master/WebDriverAgentLib/Commands/FBElementCommands.m#L404-L421

It's impossible that the condition is YES.

  if (nil == element) {
    XCUICoordinate *tapCoordinate = [self.class gestureCoordinateWithCoordinate:tapPoint application:request.session.activeApplication shouldApplyOrientationWorkaround:isSDKVersionLessThan(@"11.0")];
    [tapCoordinate tap];
  }
--> POST http://__UDID__/session/FDCC5F83-810A-4DA7-9165-6F2CE84BB565/wda/tap/0
{"x":230,"y":130}

<-- POST http://__UDID__/session/FDCC5F83-810A-4DA7-9165-6F2CE84BB565/wda/tap/0
{
  "value" : {
    "error" : "stale element reference",
    "message" : "The previously found element \"0\" is not present on the current page anymore",
    "traceback" : "(\n\t0   CoreFoundation                      ....)"
  },
  "sessionId" : "FDCC5F83-810A-4DA7-9165-6F2CE84BB565"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant