mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-12 13:45:30 +00:00
Bug 4339: Fixed wait to work with Selenium 3.x
This commit is contained in:
1 parent
621c92553c
commit
663a07121e
1 file changed
+3
-5
+3
-5
@@ -2,6 +2,7 @@ package com.sap.sailing.selenium.pages.leaderboard;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.NoSuchElementException;
|
||||
@@ -9,12 +10,9 @@ import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.WebElement;
|
||||
import org.openqa.selenium.support.ui.WebDriverWait;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.sap.sailing.selenium.pages.common.CSSHelper;
|
||||
|
||||
import com.sap.sailing.selenium.pages.gwt.CellTablePO;
|
||||
import com.sap.sailing.selenium.pages.gwt.DataEntryPO;
|
||||
|
||||
import com.sap.sailing.selenium.pages.leaderboard.LeaderboardTablePO.LeaderboardEntry;
|
||||
|
||||
public class LeaderboardTablePO extends CellTablePO<LeaderboardEntry> {
|
||||
@@ -197,9 +195,9 @@ public class LeaderboardTablePO extends CellTablePO<LeaderboardEntry> {
|
||||
}
|
||||
|
||||
public void waitForLeaderboardToHaveData() {
|
||||
new WebDriverWait(driver, 30).until(new Predicate<WebDriver>() {
|
||||
new WebDriverWait(driver, 30).until(new Function<WebDriver, Boolean>() {
|
||||
@Override
|
||||
public boolean apply(WebDriver driver) {
|
||||
public Boolean apply(WebDriver driver) {
|
||||
return !getEntries().isEmpty();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user