[XCTest][Automation] Element with locator was not found from webdriver even it is exists (only on real device iOS 16.1/16.2beta)

There is a different behaviour on same screen on simulator ios 16.1 iphone 12 and real device (SauceLabs) ios 16.1/16.2beta iPhone 12.

  1. On simulator I am able to get element by AppiumBy.iOSClassChain - **/XCUIElementTypeCell[name == 'address']/XCUIElementTypeTextView[name = 'detail_1'], and test passes. Here is screenshot from appium inspector:

  1. On real device ios 16.1/16.2beta only (iOS 15.6 issue is not reproducible) test is failing on same screen with error message Element with locator: AppiumBy.iOSClassChain: **/XCUIElementTypeCell[name == 'address']/XCUIElementTypeTextView[name = 'detail_1'] was not found from webdriver / root element after 20 seconds. Here is screenshot from appium inspector:

Expected Behavior On real device element should be found by AppiumBy.iOSClassChain: **/XCUIElementTypeCell[name == 'address']/XCUIElementTypeTextView[name = 'detail_1'] and test should pass

Minimal Reproducible Example driver.findElement(AppiumBy.iOSClassChain("**/XCUIElementTypeCell[name == 'address']/XCUIElementTypeTextView[name = 'detail_1']"));

Environment Operating system: mac If running via appium CLI... Appium CLI version (output of appium --version): 2.0.0-beta.44 Node.js version (output of node --version): v17.4.0 npm version (output of npm --version): 8.3.1 Real device or emulator/simulator: real device iOS 16.1

Link to Appium Logs https://gist.github.com/StsiapanPal/ab82d6de6510cb29614f9d48d0f0f583

I also created same issue here: https://github.com/apple/swift-corelibs-xctest/issues/423 and using feedback assistance https://feedbackassistant.apple.com/feedback/11869763 but nobody is answering there. If this is not right place to post such issues, could somebody please point to correct place?

[XCTest][Automation] Element with locator was not found from webdriver even it is exists (only on real device iOS 16.1/16.2beta)
 
 
Q