Appium tests fails recognize any kind selector for iOS 16.# versions

I am writing in regards to asking for advice about the situation I faced recently.
My team is testing a mobile application, written in React Native. Also, the testing is done on real devices, not emulators.
Until 6th of April all released builds were successfully tested by Appium.
However, for some reason the released builds after this date, seems to be not testable for iOS 16.# versions.
When we try to execute any of the previously passed tests, the Appium driver just keeps looking for the given element selector without recognizing it.
However, when we try to execute the same test against a lower iOS version - 15.0 or 14.0 - the test passes with no problem. The selectors were found and Appium could interact with it.
Also, the same test passed for older versions of the IPA builds.
I have tried to use any possible selector strategy - accessibility ID, full xpath of an element, partial xpath with some of the element attributes. None of them were recognized by the automation driver.
I also asked the dev team whether they have made some kind of update recently - Xcode version update, accessibility framework update. etc. They haven’t changed anything.
I also tried to update the Appium version from 1.22.0 to 1.22.3, but it didn’t help.
I found some similar issues in the Appium forum, but there weren’t any clear solutions for them.
I could not understand why Appium could not find and interact with a selector which hasn’t changed for months.

The Appium capabilities:
“appium:deviceName”: “iPhone_X”,
“platformName”: “iOS”,
“appium:platformVersion”: “16.0”,
“appium:app”: “*******.ipa”,
“appium:automationName”: “XCUITest”,
“appium:appiumVersion”: “1.22.0”,
“appium:settings[snapshotMaxDepth]”: “62”

NodeJS versio: 16.5.1

I would appreciate any advice how to debug further!

I wouldn’t think that Appium 1.X would work at all with iOS 16. You should use Appium 2 for that.

These days I installed the newer Appium version: “2.0.0-beta.66”, following the Appium documentation and Sauce Labs documentation for the migration process.

However, whenever I try to execute a test on a Sauce Labs device, in the appium.log file I see the older Appium version was taken:

[Appium] Appium v1.22.2 creating new XCUITestDriver (v3.59.0) session

These are the device capabilities I am using:

config.capabilities = [


    deviceName: 'iPhone 14 Pro',
    platformName: 'iOS',
    platformVersion: '16.3',
    automationName: "XCUITest",
    appWaitActivity: "*",
    app: 'storage:*****.ipa',


]; = [

['sauce', {
    'sauce:options': {
        appiumVersion : '2.0.0',



I have checked several times which appium version is installed on my local PC, which appium version is in the package.json file.

I think I have all of the correct dependencies, but somehow it still sees the older Appium version.
Is there anything special that need to be done in order to upgrade to Appium 2?


appiumVersion: '2.0.0-beta56

Thank you for the suggestions! I have tried with this version, but in the Sauce Labs session logs I still see the Appium version 1.22.2. I have just opened a ticket to the Sauce Labs support in order to ask whether there is something else that should be done.

1 Like

Thank you for following up. If you get the chance, please post the resolution of the ticket.

I have a partial answer how to make the Sauce Labs take different Appium version.
The mistake is in the capabilities. Instead of adding “appiumVersion” in the, the whole sauce:options object has to be merged with the config.capabilities:

config.capabilities = [
        'appium:deviceName': 'iPhone 14 Pro',
        platformName: 'iOS',
        'appium:platformVersion': '16.3',
        'appium:automationName': 'xcuitest',
        'appium:appWaitActivity': '*',
        'appium:app': '*****.ipa',
        'appium:appPackage': '',
        browserName: '',
        'sauce:options': {
            appiumVersion: '2.0.0',

However, I am still trying to understand why none of the selectors are recognized by the auto driver.

I have a question regarding the attributes, which Appium could find - ex: accessible, visible, clickable, etc.
From where exactly these attributes and their values come from? The dev team don’t know for their existence.
Do you know where I can find more info about the analogous attributes, which could be controlled by the dev team?

these attributes are often wrong with XCUITest. All depends how app is written and handles correctly these attributes.

example of element in page source:

<XCUIElementTypeStaticText type="XCUIElementTypeStaticText" enabled="true" visible="false" x="-684" y="331" width="197" height="20" name="subtitleLabel" label="Grow your money" value="Grow your money">

clickable = no such attribute in iOS
accessible = no such in iOS

1 Like

Hi all,
I have update on the situation of the not recognized selectors for iOS v16***, but recognized for versions 15***.
It appeared that the test failures are related to the Appium setting “snapshotMaxDepth”. Initially, this setting has value “62”, which was a working option for all iOS versions. However, for the last several .ipa builds, the value “62” is too much and I descrement it to 61. The tests started recognizing the most of the selectors, but this number is insufficient to see the deeply nested selectors and this blocks many of our tests.
I have found a post from this forum:
in which the report said that they managed to find an element + using snapshotMaxDepth with the this setup: " Using Appium 2.0.0-beta.52 and [email protected]"
Do you know how to set specific versions for a real device session in Sauce Labs?
So far, I have managed to execute a session with Appium version 2.0.0-beta64 and XCUITestDriver version v4.21.33.
My idea is to somehow downgrade these 2 versions in the Sauce Labs session and give a try with snapshotMaxDepth: 62.
I asked the same question the Sauce Labs support and now I am pending a feedback.