WebDriverWait wait = new WebDriverWait(driver, getTimeout());
// wait for Login, but we are not gonna click it testing AUTOACCEPT works.
// TODO fix assumption that all sites have a direct Login page, but not all do.
if (loginLoadedLinkText != null && !loginLoadedLinkText.equals(""))
{
wait.until(ExpectedConditions.elementToBeClickable(By.linkText(loginLoadedLinkText)));
}
else
{
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("/html")));
}