Пример #1
0
 public void clickLogo() {
   try {
     web.clickLink("Logo");
   } catch (NoElementFound noElementFound) {
     noElementFound.printStackTrace();
   }
   log.info("click on logo link");
 }
Пример #2
0
 public void userLogOut() {
   web.waitForElementPresent("LogoutLink");
   try {
     web.clickLink("LogoutLink");
     log.info("User Logout correct");
   } catch (NoElementFound noElementFound) {
     noElementFound.printStackTrace();
   }
 }
Пример #3
0
  public void switchToUnderwearBathMenu() {
    try {
      web.moveToElementAndClick("UnderwearBathMenu", "UnderwearBathMenuLink");
    } catch (NoElementFound noElementFound) {
      noElementFound.printStackTrace();
    }

    if (web.waitForElementPresent("Panties")) {
      log.info("SwitchTo Underwear Bath Menu was correct");
    } else {
      log.error("SwitchTo Underwear Bath Menu was INCORRECT");
    }
  }
Пример #4
0
  public boolean isUserLogOut() {
    try {
      if (web.isElementPresent("LoginLink")) {
        log.info("LogOut was correct");
        return true;
      } else {
        log.error("LogOut was INcorrect");
        return false;
      }
    } catch (NoElementFound noElementFound) {
      noElementFound.printStackTrace();
    }

    return false;
  }
Пример #5
0
  public void switchToLoginPage() {
    try {
      web.clickLink("LoginLink");
    } catch (NoElementFound noElementFound) {
      noElementFound.printStackTrace();
    }
    log.info("click on LoginLink");

    try {
      if (web.isElementPresent("EmailField")) {
        log.info("SwitchTo Login Page was correct");
      } else {
        log.error("SwitchTo Login Page was INCORRECT");
      }
    } catch (NoElementFound noElementFound) {
      noElementFound.printStackTrace();
    }
  }