Using XCUITest according to appium documentation
See original GitHub issueThere is an awesome, comprehensive guide of all the different XCUI functionality here: https://appium.io/slate/en/master/?python#querying-for-elements-xcuielementquery
Reading through those makes me want to use many of them, such as childrenMatchingType
, containingPredicate
, …
Is there a way to use the documented functionality from within a Appium client? To my current knowledge, the only option we have using XCUITest directly is something like this:
driver.find_element_by_ios_predicate_string('label == "OK" AND type == "XCUIElementTypeButton"')
This means we can’t do nested searches using predicates and instead must use XPath as soon as we want to have nested queries.
Long story short, is there a way to use all the functionality provided in the documentation mentioned above? And if so, can you give samples on how to use them?
I’m curious if something like this would be possible in the future:
driver.find_element_by_xcui(
element('name == "some_id_here" AND type == "XCUIElementTypeTableCell")
.containingPredicate('label == "OK" AND type == "XCUIElementTypeButton"')
)
Issue Analytics
- State:
- Created 6 years ago
- Comments:26 (2 by maintainers)
Top GitHub Comments
Adding predicates support looks challenging and I like challenges: https://github.com/facebook/WebDriverAgent/pull/522 😃
It’s a typo. I cannot fix it, because FB restricted the access