you could use conditionalsleep
Example; This will sleep for 500 if condition is true (which is if the specific widget is not visible.)
new ConditionalSleep(500) {
@Override
public boolean condition() throws InterruptedException {
return !getWidgets().isVisible(parent,child);
}
}.sleep();