Skip to content

Commit

Permalink
Define nextPageXPath earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasnaphas committed Apr 15, 2024
1 parent 28f6633 commit fa49215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion itest/Links.itest.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ const waitOptions = { timeout /*, visible: true */ };
return await pg.evaluate(() => window.location.href.split("#")[1]);
};
// page to the lib we're checking
const nextPageXPath = `//button[text()="Next page"]`;
while ((await currentPageNumber(liveReadPage)) < liveReadPageNumber) {
await liveReadPage.waitForXPath(nextPageXPath);
await liveReadPage.click("xpath/" + nextPageXPath);
Expand Down Expand Up @@ -933,7 +934,6 @@ const waitOptions = { timeout /*, visible: true */ };
await page.goto(readLinkHref);
const readThisPageAloudXPath = `//*[text()="Read aloud. Have a new person read each page, going around the Seder. Click a gray box to see the prompt."]`;
await page.waitForXPath(readThisPageAloudXPath);
const nextPageXPath = `//button[text()="Next page"]`;
await page.waitForXPath(nextPageXPath);
const populatedScriptHref = (() => {
const readLinkUrl = new URL(readLinkHref);
Expand Down

0 comments on commit fa49215

Please sign in to comment.