Skip to content

Instantly share code, notes, and snippets.

@cipolleschi
Created August 9, 2020 09:46
Show Gist options
  • Select an option

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

Select an option

Save cipolleschi/5ed54647e5331c352e0809272cd667c9 to your computer and use it in GitHub Desktop.
// In the LegalView.swift
func setup() {
// .. add element to subview
self.tosButton.accessibilityIdentifier = "legal_view.tos_button"
self.privacyButton.accessibilityIdentifier = "legal_view.privacy_button"
self.continueButton.accessibilityIdentifier = "legal_view.continue_button"
}
// ---
// In the UITest
func test() {
let tosButton = self.app.buttons["legal_view.tos_button"]
let privacyButton = self.app.buttons["legal_view.privacy_button"]
let continueButton = self.app.buttons["legal_view.continue_button"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment