Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Feature file :
- @usernamevalidation
- Scenario Outline: Username already exist
- When Click on SignUp
- And username is '<username>'
- And phone is '<phonenumber>'
- And Email is '<email>'
- And companyname is '<companyname>'
- Then validation of username and email
- Examples: :
- | username | phonenumber | email | companyname |
- | romalwinn888554 | 65236523 | phurbadolma@yahoo.com | AAA |
- | laroche | 789654456 | phurbadolma@yahoo.com | AAA |
- | macharya1 | 786541212 | phurbadolma@yahoo.com | AAA|
- Method :
- public void userAlreadyExist(){
- utils.waitForElements(useralreadyExist , KnowsTestContext.timeout , KnowsTestContext.driver);
- String actual = useralreadyExist.getText();
- String expected = "Username already exists" ;
- Assert.assertEquals(actual , expected);
- }
- public void emailAlreadyExist(){
- utils.waitForElements(emailalreadyExist , KnowsTestContext.timeout , KnowsTestContext.driver);
- String actual = emailalreadyExist.getText();
- String expected = "Email already exists" ;
- Assert.assertEquals(actual , expected);
- }
Add Comment
Please, Sign In to add comment