public void setup() { super.setup(); homePage = Homepage.homePage(); try { header = Header.header(); headerlogin = header.openHeaderLoginForm(); loginPage = headerlogin.doInvalidLogin("", ""); forgotPassword = loginPage.clickOnForgotPassword(); } catch (Exception e) { AutomationLog.error("Could not navigate to Forgot Password Page"); } }
@Override public void setup() { super.setup(); homePage = Homepage.homePage(); try { header = Header.header(); headerLoginForm = header.openHeaderLoginForm(); HashMap<String, String> loginData = testCaseData.get("validCredential"); String UserName = loginData.get("username"); String Password = loginData.get("password"); homePage = headerLoginForm.doSuccessfulLogin(UserName, Password); WaitFor.presenceOfTheElement(Page.driver, homePage.getHomepageGreetingsLocator()); subnavigation = Page.subNavigation(); dashboard = subnavigation.clickLinkMyDashboard(); overviewTab = dashboard.editProfile(); } catch (Exception e) { AutomationLog.error("Overview tab not found"); } }