Add wait for body to AbstractPage.navigateTo

(cherry picked from commit aba731b)
This commit is contained in:
Vaclav Muzikar 2016-02-10 11:31:15 +01:00
parent 3a138db842
commit d3769caaac

View file

@ -24,6 +24,9 @@ import javax.ws.rs.core.UriBuilder;
import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.drone.api.annotation.Drone;
import org.jboss.logging.Logger; import org.jboss.logging.Logger;
import static org.keycloak.testsuite.util.WaitUtils.pause; import static org.keycloak.testsuite.util.WaitUtils.pause;
import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriver;
/** /**
@ -90,6 +93,7 @@ public abstract class AbstractPage {
log.info("navigating to " + uri); log.info("navigating to " + uri);
driver.navigate().to(uri); driver.navigate().to(uri);
pause(300); // this is needed for FF for some reason pause(300); // this is needed for FF for some reason
waitUntilElement(By.tagName("body")).is().visible();
log.info("current URL: " + driver.getCurrentUrl()); log.info("current URL: " + driver.getCurrentUrl());
} }