appium-for-mac
appium-for-mac copied to clipboard
elements not findable
I tried to find the "main display" element in the calculator app, to no avail. I tried many different ways, including the auto-generated AXPath from appium for mac (holding down the function key). I also manually constructed various AXPaths after looking at the source. am I missing something?
@jlipps I'm not sure what "main display" is supposed to be. Are you referring to one of the screens in a multi-screen configuration?
Maybe main window?
There's an element with AXDescription of "main display" -- it's the part where the calc output is displayed.
Found it. You have to be in Scientific or Programmer mode. Basic doesn't have it. In one of those modes, hover over the displayed value.
The AXPath I get in scientific mode ("/AXApplication[@AXTitle='Calculator']/AXWindow[@AXIdentifier='_NS:477' and @AXSubrole='AXStandardWindow']/AXGroup[@AXIdentifier='_NS:9']"
) is also not findable from my test, either in scientific or regular mode.
[HTTP] --> POST /wd/hub/session/cd0128db-e2c2-44ce-8a2f-2dd17879066d/elements {"using":"xpath","value":"/AXApplication[@AXTitle='Calculator']/AXWindow[@AXIdentifier='_NS:477' and @AXSubrole='AXStandardWindow']/AXGroup[@AXIdentifier='_NS:9']"}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[debug] [JSONWP Proxy] Proxying [POST /wd/hub/session/cd0128db-e2c2-44ce-8a2f-2dd17879066d/elements] to [POST http://127.0.0.1:4622/wd/hub/session/Ogcccxnb/elements] with body: {"using":"xpath","value":"/AXApplication[@AXTitle='Calculator']/AXWindow[@AXIdentifier='_NS:477' and @AXSubrole='AXStandardWindow']/AXGroup[@AXIdentifier='_NS:9']"}
[Appium4Mac] [STDERR] 2017-05-01 10:10:55.789 AppiumForMac[45674:742311]
[Appium4Mac] [STDERR]
[Appium4Mac] [STDERR]
[Appium4Mac] [STDERR] ************* findAllUsingAbsoluteAXPath: /AXApplication[@AXTitle='Calculator']/AXWindow[@AXIdentifier='_NS:477' and @AXSubrole='AXStandardWindow']/AXGroup[@AXIdentifier='_NS:9']
[Appium4Mac] [STDERR] 2017-05-01 10:10:55.789 AppiumForMac[45674:742311] axPathComponents:(
[Appium4Mac] [STDERR] "AXApplication[@AXTitle='Calculator']",
[Appium4Mac] [STDERR] "AXWindow[@AXIdentifier='_NS:477' and @AXSubrole='AXStandardWindow']",
[Appium4Mac] [STDERR] "AXGroup[@AXIdentifier='_NS:9']"
[Appium4Mac] [STDERR] )
[Appium4Mac] [STDERR] 2017-05-01 10:10:55.811 AppiumForMac[45674:742311]
[Appium4Mac] [STDERR] ************* findAllUsingAbsoluteAXPath matchedNodes:(
[Appium4Mac] [STDERR] "<PFUIElement: 0x7fec19fc2280> {\n AXDescription = \"<null>\";\n AXHelp = \"<null>\";\n AXRole = AXGroup;\n AXRoleDescription = group;\n AXSubrole = \"<null>\";\n AXTitle = \"<null>\";\n}"
[Appium4Mac] [STDERR] )
[Appium4Mac] [STDERR]
[Appium4Mac] [STDERR]
[debug] [JSONWP Proxy] Got response with status 200: {"status":7,"sessionId":"Ogcccxnb","value":{"message":"An element could not be located on the page using the given search parameters."}}
[JSONWP Proxy] Replacing sessionId Ogcccxnb with cd0128db-e2c2-44ce-8a2f-2dd17879066d
[HTTP] <-- POST /wd/hub/session/cd0128db-e2c2-44ce-8a2f-2dd17879066d/elements 200 1014 ms - 164
(on an unrelated note, errors like these should be returned with http status 500, not http status 200)