Adding additional wait for citest

This commit is contained in:
Martin Stockhammer 2017-06-10 20:54:00 +02:00
parent 6470118db0
commit 272ebbdb52
1 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,7 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.concurrent.TimeUnit;
/**
* @author Olivier Lamy
@ -89,6 +90,11 @@ public class WebDriverTest
// wait until topbar-menu-container is feeded
//await().atMost(20, TimeUnit.SECONDS).until($("#topbar-menu")).present();
await().untilPredicate((fl) ->$("#topbar-menu").present());
await().atMost( 10, TimeUnit.SECONDS).untilPredicate( ( fl) -> el("#create-admin-link-a").conditions().clickable() ||
el("#login-link-a").conditions().clickable()
);
FluentList<FluentWebElement> elements = find("#create-admin-link-a");
if (!elements.isEmpty() && elements.get(0).displayed()) {