Skip to content

Commit

Permalink
chore: wait for resultDiv
Browse files Browse the repository at this point in the history
  • Loading branch information
edalex-yinzi committed Feb 15, 2024
1 parent e961dd5 commit f1c97f6
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
import com.tle.webtests.framework.PageContext;
import com.tle.webtests.pageobject.PrefixedName;
import com.tle.webtests.pageobject.viewitem.SummaryPage;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.ui.ExpectedConditions;

public abstract class AbstractItemList<
T extends AbstractItemList<T, SR>, SR extends AbstractItemSearchResult<SR>>
extends AbstractResultList<T, SR> {
@FindBy(className = "searchresults")
private WebElement resultDiv;

@FindBy(id = "searchresults-stats")
private WebElement statsDiv;

Expand All @@ -22,7 +21,7 @@ public AbstractItemList(PageContext context) {

@Override
public WebElement getResultsDiv() {
return resultDiv;
return waiter.until(ExpectedConditions.presenceOfElementLocated(By.className("searchresults")));
}

public SummaryPage viewFromTitle(PrefixedName title) {
Expand Down

0 comments on commit f1c97f6

Please sign in to comment.