Skip to content

Instantly share code, notes, and snippets.

@cipolleschi
Created August 2, 2020 10:45
Show Gist options
  • Select an option

  • Save cipolleschi/a9ffbfe777ad7de3a7d28ad1d0c79ff7 to your computer and use it in GitHub Desktop.

Select an option

Save cipolleschi/a9ffbfe777ad7de3a7d28ad1d0c79ff7 to your computer and use it in GitHub Desktop.
private func setup() {
// ... other view elements ...
self.addSubview(tosButton)
self.addSubview(privacyButton)
self.addSubview(continueButton)
// Add these lines to let the XCUITest access the buttons with identifiers
self.tosButton.accessibilityIdentifier = "legal_view.tos_button"
self.privacyButton.accessibilityIdentifier = "legal_view.privacy_button"
self.continueButton.accessibilityIdentifier = "legal_view.continue_button"
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment