Skip to content

Commit

Permalink
deps(puppeteer): use page.waitForSelector instead of page.waitForXpath
Browse files Browse the repository at this point in the history
  • Loading branch information
nabondance committed May 27, 2024
1 parent a7b1539 commit 0409d76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/texei/cpqsettings/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default class Set extends SfCommand<CpqSettingsSetResult> {
const xpath = `xpath/.//label[normalize-space(text())='${key}']/ancestor::th[contains(@class, 'labelCol')]/following-sibling::td[contains(@class, 'dataCol') or contains(@class, 'data2Col')][position()=1]//*[name()='select' or name()='input']`;

// Await because some fields only appears after a few seconds when checking another one
await page.waitForXPath(xpath);
await page.waitForSelector(xpath);

const targetInputs = await page.$$(xpath);
const targetInput = targetInputs[0];
Expand Down

0 comments on commit 0409d76

Please sign in to comment.