Skip to content

Commit

Permalink
chore: add waiter
Browse files Browse the repository at this point in the history
  • Loading branch information
edalex-yinzi committed Feb 14, 2024
1 parent d9060fa commit f89dc18
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ public List<SR> getResults() {

if (isResultsAvailable()) {
WebElement result = getResultsDiv();
By find = By.xpath("//div[@class='itemresult-wrapper']");
waiter.until(ExpectedConditions.presenceOfAllElementsLocatedBy(find));

int count = result.findElements(By.xpath("//div[@class='itemresult-wrapper']")).size();
int count = result.findElements(find).size();

for (int i = 1; i <= count; i++) {
results.add(getResult(i));
Expand Down

0 comments on commit f89dc18

Please sign in to comment.