From ebce2544c98067f88088d70fcb851e809ce6e304 Mon Sep 17 00:00:00 2001 From: Stephan Vogel <149689016+aviv-stephanvogel@users.noreply.github.com> Date: Tue, 30 Apr 2024 15:53:17 +0200 Subject: [PATCH] fix issue with xpath search element. use equal not compare string --- src/commands/texei/cpqsettings/set.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/texei/cpqsettings/set.ts b/src/commands/texei/cpqsettings/set.ts index 4ccdcc1..b26fcc5 100644 --- a/src/commands/texei/cpqsettings/set.ts +++ b/src/commands/texei/cpqsettings/set.ts @@ -101,7 +101,7 @@ export default class Set extends SfCommand { 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);