@Test public void canAuthenticateUsingBasicAuthentication() { String url = appServer.whereIs("basicAuth"); driver.get(url); Alert alert = wait.until(alertIsPresent()); UserAndPassword user = new UserAndPassword("test", "test"); alert.authenticateUsing(user); assertEquals("authorized", driver.findElement(By.tagName("h1")).getText()); }