Last active
August 18, 2016 18:43
-
-
Save sposterkil/20f23c19cb47ac267b918e5d186748aa to your computer and use it in GitHub Desktop.
Page Object Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usersPage | |
.clickAddUserButton() // returns AddUserPage | |
.enterName("Sam Osterkil") // returns AddUserPage | |
.enterPassword("Password") // returns AddUserPage | |
.clickSubmit() // returns AddUserOutcome, which is just an object with "expectValid" and "expectError" methods | |
.expectValid() // returns UsersPage | |
.selectUserFromList("Sam Osterkil") // returns UsersPage | |
.clickEditUserButton() // returns EditUserPage | |
.enterPassword("") // returns EditUserPage | |
.clickSubmit() // returns EditUserOutcome, which is just an object with "expectValid" and "expectError" methods | |
.expectError("Password is required.") // returns EditUserPage | |
.enterPassword("newPassword") // returns EditUserPage | |
.clickSubmit() // returns EditUserOutcome, which is just an object with "expectValid" and "expectError" methods | |
.expectValid() // returns UsersPage | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment