@Test public void Login01() throws InterruptedException { LoginPage = new LoginPage(driver); LoginPage.clickLogYourSelfLink(); LoginPage.Login("*****@*****.**", "pass123"); // Explicit Wait /* * WebDriverWait wait = new WebDriverWait(driver, 10); * wait.until(ExpectedConditions * .visibilityOfElementLocated(By.id(element))); } */ Common.verifyText("Welcome to Connectedio"); LoginPage.clickLogOff(); }
@Test public void Login02() throws InterruptedException { LoginPage = new LoginPage(driver); LoginPage.clickLogYourSelfLink(); LoginPage.clickSignIn(); // Fluent Wait /* * Wait<WebDriver> wait = new FluentWait<WebDriver>(driver) //Wait * for the condition .withTimeout(30, TimeUnit.SECONDS) // which to * check for the condition with interval of 5 seconds. * .pollingEvery(5, TimeUnit.SECONDS) //Which will ignore the * NoSuchElementException .ignoring(NoSuchElementException.class); */ Common.verifyText(" Error: No match for E-Mail Address and/or Password."); }