Skip to content

Commit

Permalink
Fix XPath for pagination buttons due to datatables upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Sep 20, 2024
1 parent 1850cd4 commit 7773f75
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,11 @@ public AnalysisResult clickFilterLinkOnSite(final WebElement element) {
* the number representing the page to open
*/
public void openTablePage(final int pageNumber) {
WebElement webElement = analysisResult.find(By.xpath("//a[@class='page-link' and @data-dt-idx='" + (pageNumber - 1) + "']"));
var pageButton = "//button[@class='page-link' and @data-dt-idx='" + (pageNumber - 1) + "']";
WebElement webElement = analysisResult.find(By.xpath(pageButton));
webElement.click();

analysisResult.waitFor(By.xpath("//a[@class='page-link' and @data-dt-idx='" + (pageNumber - 1) + "']/parent::li[contains(@class, 'active')]"));
analysisResult.waitFor(By.xpath(pageButton + "/parent::li[contains(@class, 'active')]"));

updateTableRows();
}
Expand Down

0 comments on commit 7773f75

Please sign in to comment.