Skip to content

Instantly share code, notes, and snippets.

@AviTsadok
Created July 23, 2019 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AviTsadok/79eecb51a6113332901a6c5590803e0f to your computer and use it in GitHub Desktop.
Save AviTsadok/79eecb51a6113332901a6c5590803e0f to your computer and use it in GitHub Desktop.
Signup Screen Page Object for UI Testing
import XCTest
class SignUpScreen: NSObject {
let app = XCUIApplication()
func doSignIn(email : String, password : String)->OnboardingPageObject {
// fill the email text field
// fill the password text field
// press the go button
// return the next page object which is the onboarding page
}
func isCurrentPageIsSignup()->Bool {
// check if this is the signup page for validation
}
private func getEmailTextField()->XCUIElement {
// return the XCUIElement of the email text field
}
private func getPasswordTextField()->XCUIElement {
// return the XCUIElement of the email text field
}
private func getGoButton()->XCUIElement {
// return the XCUIElement of the go button
}
privaet func pressGo() {
// press the go button
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment