question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using XCUITest according to appium documentation

See original GitHub issue

There 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:closed
  • Created 6 years ago
  • Comments:26 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
mykola-mokhnachcommented, Mar 24, 2017

Adding predicates support looks challenging and I like challenges: https://github.com/facebook/WebDriverAgent/pull/522 😃

1reaction
mykola-mokhnachcommented, Jun 7, 2018

It’s a typo. I cannot fix it, because FB restricted the access

Read more comments on GitHub >

github_iconTop Results From Across the Web

XCUITest (iOS) - Appium
Appium's primary support for automating iOS apps is via the XCUITest driver. (New to Appium? Read our introduction to Appium drivers). This driver...
Read more >
Appium vs XCUITest : Key Differences - BrowserStack
It is built on top of XCTest – a test framework that is integrated within Apple's Xcode IDE. XCUITest enables developers or QAs...
Read more >
Intro to Appium - Appium Documentation - GitHub Pages
The Appium driver that supports iOS app automation is called the XCUITest Driver because ultimately what it does is convert the WebDriver protocol...
Read more >
Espresso and XCUITest on Sauce Labs
Sauce Labs uses its framework agnostic test orchestrator saucectl to ... file according to the configuration documentation for Espresso and ...
Read more >
How To Automate iOS App Using Appium | LambdaTest
As stated on the official website of Appium, the Appium team does not test the XCUITest driver against jailbroken devices, so it cannot...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found