Skip to content

Commit

Permalink
wait for pager buttons to become clickable before clicking them (#1802)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-chrisj authored Jan 23, 2024
1 parent e12ced6 commit f41c894
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/org/labkey/test/components/ui/Pager.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.labkey.test.components.react.MultiMenu;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;

/**
* Wrapper for UI component defined in 'packages/components/src/internal/components/gridbar/PageSizeSelector.tsx'
Expand Down Expand Up @@ -113,6 +114,7 @@ public Pager clickPrevious()
_pagedComponent.doAndWaitForUpdate(() ->
{
getWrapper().scrollIntoView(button);
getWrapper().shortWait().until(ExpectedConditions.elementToBeClickable(button));
button.click();
});
return this;
Expand All @@ -130,6 +132,7 @@ public Pager clickNext()
_pagedComponent.doAndWaitForUpdate(() ->
{
getWrapper().scrollIntoView(button);
getWrapper().shortWait().until(ExpectedConditions.elementToBeClickable(button));
button.click();
});
return this;
Expand Down

0 comments on commit f41c894

Please sign in to comment.