Guest User

Untitled

a guest
Jul 5th, 2018
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. Feature file :
  2. @usernamevalidation
  3. Scenario Outline: Username already exist
  4.  
  5. When Click on SignUp
  6. And username is '<username>'
  7. And phone is '<phonenumber>'
  8. And Email is '<email>'
  9. And companyname is '<companyname>'
  10. Then validation of username and email
  11.  
  12. Examples: :
  13.  
  14. | username | phonenumber | email | companyname |
  15. | romalwinn888554 | 65236523 | phurbadolma@yahoo.com | AAA |
  16. | laroche | 789654456 | phurbadolma@yahoo.com | AAA |
  17. | macharya1 | 786541212 | phurbadolma@yahoo.com | AAA|
  18.  
  19. Method :
  20. public void userAlreadyExist(){
  21. utils.waitForElements(useralreadyExist , KnowsTestContext.timeout , KnowsTestContext.driver);
  22. String actual = useralreadyExist.getText();
  23. String expected = "Username already exists" ;
  24. Assert.assertEquals(actual , expected);
  25. }
  26.  
  27. public void emailAlreadyExist(){
  28. utils.waitForElements(emailalreadyExist , KnowsTestContext.timeout , KnowsTestContext.driver);
  29. String actual = emailalreadyExist.getText();
  30. String expected = "Email already exists" ;
  31. Assert.assertEquals(actual , expected);
  32. }
Add Comment
Please, Sign In to add comment