Exemple #1
0
 @Test(groups = {"smoke", "positive"})
 public void LoginSuccess() {
   Log.info("Checking that all correct data added successfully");
   try {
     loginPage.fillEmailField(USER).fillPasswordField(PASSWORD).clickOnLogin();
     mainPage.waitUntilMainPageIsLoaded();
     assertTrue("The Main Page doesn't open", mainPage.isOnMainPage());
     mainPage.logOut();
     // homePage.waitUntilHomePageIsLoaded();
     // assertTrue("The Home Page doesn't open", homePage.isOnHomePage());
   } catch (Exception e) {
     e.printStackTrace();
   }
   Reporter.log("Login successful");
 }
Exemple #2
0
 @Test(groups = {"smoke", "positive"})
 public void LoginLogoutLogin() {
   Log.info("Checking ability login ,logout and login again with another user");
   try {
     loginPage.fillEmailField(USER).fillPasswordField(PASSWORD).clickOnLogin();
     mainPage.waitUntilMainPageIsLoaded();
     mainPage.logOut();
     // homePage.waitUntilHomePageIsLoaded();
     //  homePage.clickOnLogin();
     loginPage
         .waitUntilLoginPageIsLoaded()
         .fillEmailField(USER1)
         .fillPasswordField(PASSWORD)
         .clickOnLogin();
     mainPage.waitUntilMainPageIsLoaded();
     assertTrue("The Main Page doesn't open", mainPage.isOnMainPage());
     mainPage.logOut();
     //  homePage.waitUntilHomePageIsLoaded();
   } catch (Exception e) {
     e.printStackTrace();
   }
   Reporter.log("Login successful");
 }