Skip to content

Instantly share code, notes, and snippets.

@delasign
Created November 9, 2024 16:19
Show Gist options
  • Save delasign/86c63e18ca4284c76b1e8f7a07eb5324 to your computer and use it in GitHub Desktop.
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
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