Last active
December 4, 2018 13:30
-
-
Save abhilashshettigar/e8827be96d1e3a1de1f0947c5460ad1b to your computer and use it in GitHub Desktop.
Sample Code for Cypress with Page object method
This file contains hidden or 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
export class Login { | |
getUsername(){ | |
return cy | |
.get(':nth-child(1) > .form-control') | |
} | |
getPassword(){ | |
return cy | |
.get(':nth-child(2) > .form-control') | |
} | |
getSignupBtn(){ | |
return cy | |
.get('.btn-red') | |
} | |
getLoginBtn(){ | |
return cy | |
.get('.btn-blue') | |
} | |
getForgotPasswordBtn(){ | |
return cy | |
.get(':nth-child(1) > .btn-red') | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment