For individual element the code below could be used:
private boolean isElementPresent(By by) {
try {
driver.findElement(by);
return true;
} catch (NoSuchElementException e) {
return false;
}
}
for (int second = 0;; second++) {
if (second >= 60){
fail("timeout");
}
try {
if (isElementPresent(By.id("someid"))){
break;
}
}
catch (Exception e) {
}
Thread.sleep(1000);
}