public void clickLogo() { try { web.clickLink("Logo"); } catch (NoElementFound noElementFound) { noElementFound.printStackTrace(); } log.info("click on logo link"); }
public void userLogOut() { web.waitForElementPresent("LogoutLink"); try { web.clickLink("LogoutLink"); log.info("User Logout correct"); } catch (NoElementFound noElementFound) { noElementFound.printStackTrace(); } }
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"); } }
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; }
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(); } }