Unable to find visible elements
See original GitHub issueHi,
system characteristics:
**iPhone 6s iOS 10.2 Appium Desktop 1.10.0 Xcode 10.1 MacOS High Sierra 10.13.6
iPhone 7 iOS 12.2 Appium Desktop 1.10.0 Xcode 10.1 MacOS High Sierra 10.13.6**
In a specific section of the application under test, I tried to find all ‘XCUIElementTypeStaticText’ visible, but only one element was returned (in the pictures at the bottom).
When I tried to run the following query by iPhone 6s:
- Predicate iOS: type == ‘XCUIElementTypeStaticText’ and visible == 1
- **Class Chain: /XCUIElementTypeStaticText[
visible == 1
]
- Xpath: //XCUIElementTypeStaticText[@visible = ‘true’]
As you can see for Xpath the elements retrieved are correct.
When I tried to run the following query by iPhone 7:
- Predicate iOS: type == ‘XCUIElementTypeStaticText’ and visible == 1
- **Class Chain: /XCUIElementTypeStaticText[
visible == 1
]
- Xpath: //XCUIElementTypeStaticText[@visible = ‘true’]
Moreover, as you see in the picture at the bottom, the application’s elements, although them are visible, have set up visible attribute to false on iPhone 7, instead with iPhone6 the attribute visible is true.
Finally, the find action is very slow also when is captured the screenshot and page source.
This is the link pointing to log file that include all action described: appium.log
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
At some point of time Appium started to use the visibility attribute provided by XCTest instead of the custom hacky logic. This is how it happened.
@mykola-mokhnach Do you know if anyone reported this to Apple yet? Is the workaround for this using
simpleIsVisibleCheck
?Is there a way to enable that in the appium desktop inspector too?