Skip to content

Commit

Permalink
Merge pull request #161 from aviv-stephanvogel/CPQSetting-xpath-search
Browse files Browse the repository at this point in the history
fix issue with xpath search element.
  • Loading branch information
FabienTaillon authored Apr 30, 2024
2 parents 55402bf + ebce254 commit 2c4f85a
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 @@ -101,7 +101,7 @@ export default class Set extends SfCommand<CpqSettingsSetResult> {
this.spinner.start(`Looking for '${key}'`, undefined, { stdout: true });

// Getting label and traverse to corresponding input/select
const xpath = `//label[contains(text(), '${key}')]/ancestor::th[contains(@class, 'labelCol')]/following-sibling::td[contains(@class, 'dataCol') or contains(@class, 'data2Col')][position()=1]//*[name()='select' or name()='input']`;
const 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);
Expand Down

0 comments on commit 2c4f85a

Please sign in to comment.