Hello there,
I'm using Appium's inspector (precompiled binary 1.5.3 for mac os) properly linked with an updated appium installation through npm (1.6).
So, since I've using XCUITest there are a new boolean property or attribute called 'visible' at Appium inspector.
This could be an inspected XCUITest element:
name: mytext
type: XCUIElementTypeStaticText
value: mytext
label: mytext
enabled: true
visible: false
valid: true
- The visible attribute cannot be used as a condition in xpath expressions:
//*[@visible='true' or @visible='false']
will never locate any element using inspector or java client code.
-
Appium inspector locator is able to locate non visible elements while programatically (java client in my case) you cannot locate non-visible elements with a findElements instruction. The following xpath would locate the element described above using Appium's inspector but java-client findElement function throws a timeout exception:
//*[@label='mytext']
How is the correct way to handle visible=false
elements?
Thank you.