the helper method below can be called by the test class to determine when the page is fully synchronized with the server and the next action can be performed.
public static void waitForPageToFinishRendering(WebDriver oDriver, int timeout) {
ExpectedCondition
public Boolean apply(WebDriver d) {
JavascriptExecutor js = (JavascriptExecutor) d;
Boolean isReady = (Boolean)js.executeScript("return AdfPage.PAGE.isSynchronizedWithServer()");
return isReady;
}
};
WebDriverWait w = new WebDriverWait(oDriver,
w.until(e);
}