Advertisement
Guest User

Untitled

a guest
May 15th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. @Given("^user is on the login page$")
  2. public void user_on_login_page() {
  3. DPSigninPage signinPage = new DPSigninPage();
  4. signinPage = new DPSigninPage();
  5. }
  6.  
  7.  
  8. @And("^User selects login as teacher$")
  9. public void user_selects_loginAsTeacher() throws InterruptedException {
  10. DefaultLoginPage loginPage = new DefaultLoginPage();
  11. loginPage.loginAsTeacher();
  12. }
  13.  
  14.  
  15. @When("^user logs in with valid credentials username: ([^\"]*) and password: ([^\"]*)$")
  16. public void user_logs_in_with_valid(String uname, String pwd) throws InterruptedException {
  17. // First time login failure issue -
  18. UserHomePage userHomePage = new UserHomePage();
  19. userHomePage.waitForPageToLoad();
  20. DPSigninPage signinPage = new DPSigninPage();
  21. signinPage.enterLoginDetails(uname, pwd);
  22. userHomePage = signinPage.clickSignInButton();
  23. }
  24.  
  25.  
  26. @Then("^teacher is signed in$")
  27. public void teacher_is_signed_in() throws Exception {
  28. UserHomePage userHomePage = new UserHomePage();
  29. userHomePage.isloaded();
  30.  
  31. }
  32.  
  33.  
  34. @And("^Teacher sees their firstname: ([^\"]*) and lastname: ([^\"]*) on the Product Page$")
  35. public void teacher_sees_their_name_on_product_page(String fname, String lname) {
  36. UserHomePage userHomePage = new UserHomePage();
  37. userHomePage.verifyFirstNameAndLastName(fname, lname);
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement