Skip to content

Instantly share code, notes, and snippets.

@ngtk
Last active April 22, 2019 11:32
Show Gist options
  • Select an option

  • Save ngtk/3217e9fcc3f0605cb2ffd7b9ec42b224 to your computer and use it in GitHub Desktop.

Select an option

Save ngtk/3217e9fcc3f0605cb2ffd7b9ec42b224 to your computer and use it in GitHub Desktop.
class WelcomePage: Page {
// ...
private var loginButton: XCUIElement { return view.buttons["loginButton"] }
private var signUpButton: XCUIElement { return view.buttons["signUpButton"] }
func tapLoginButton() -> LoginPage {
loginButton.tap()
return LoginPage(app: app)
}
func tapSignUpButton() -> SignUpPage {
signUpButton.tap()
return SignUpPage(app: app)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment