Skip to content

(null) could not be tapped #481

@bootstraponline

Description

@bootstraponline
info: [INST] 2013-04-27 22:41:48 +0000 Default: Got new command 11 from instruments: au.getElementByXpath('button[contains(@text, \'sign in\')]')
info: [INST] 2013-04-27 22:41:48 +0000 Default: Lookup returned [object UIAButton] with the name "Sign In" (id: 11).
info: [INST] 2013-04-27 22:41:48 +0000 Default: Lookup returned [object UIAButton] with the name "Sign In" (id: 12).

On iOS, Appium will happily return an invisible element (that crashes when tapped) even if a visible element matches the search criteria. The fix is to prefer returning visible elements.

I fixed a similar issue in ruby_lib however the bug is present in all XPath methods in Appium on iOS.

info: Responding to client with error: {"status":17,"value":{"message":"An error occurred while executing user supplied JavaScript.","origValue":"(null) could not be tapped"},"sessionId":"11116962-5c9e-4d88-b1fb-2d3bbb4861e4"}
POST /wd/hub/session/11116962-5c9e-4d88-b1fb-2d3bbb4861e4/element/11/click 500 2112ms - 215
debug: Appium request initiated at /wd/hub/session/11116962-5c9e-4d88-b1fb-2d3bbb4861e4/execute
debug: Request received with params: {"script":"mobile: reset","args":[]}
info: Resetting app mid-session
info: Shutting down appium session...
info: [INST] 2013-04-27 22:41:49 +0000 Debug: (null).tap()
       2013-04-27 22:41:49 +0000 Debug: (null).scrollToVisible()
2013-04-27 22:41:49 +0000 Debug: Unexpected error in -[UIAButton_0x8e90b10 scrollToVisible], /SourceCache/UIAutomation_Sim/UIAutomation-271/Framework/UIAElement.m line 1545, kAXErrorFailure
2013-04-27 22:41:49 +0000 Debug: Unexpected error in -[UIAButton_0x8e90b10 scrollToVisible], /SourceCache/UIAutomation_Sim/UIAutomation-271/Framework/UIAElement.m line 1545, kAXErrorFailure
2013-04-27 22:41:50 +0000 Debug: (null) could not be tapped
2013-04-27 22:41:50 +0000 Stopped: Script was stopped by the user

Metadata

Metadata

Assignees

No one assigned

    Labels

    Buga problem that needs fixingiOSrelated to iOS native driver(s)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions