Created
November 9, 2024 16:19
-
-
Save delasign/86c63e18ca4284c76b1e8f7a07eb5324 to your computer and use it in GitHub Desktop.
Sample code for finding a view within an app that matches an accessibility identifier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XCTest | |
func getAppView(identifier: String) -> XCUIElement { | |
return XCUIApplication().descendants(matching: .any).matching(identifier: identifier).element | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment