Unable to find element located by Xpath ( Salesforce)

Hi everyone,

The support is not able to help me.

I request your help concerning this issue.

2023-04-03 11:47:27.827 DEBUG t.b.TC - Create a case from case object - 12: delay(2)
2023-04-03 11:47:29.840 DEBUG t.b.TC - Create a case from case object - 13: waitForElementVisible(findTestObject(“Object Repository/A trier/Create Case/Page_New Case Generic Salesforce/lightning-base-combobox-item_Information request”), 10)
2023-04-03 11:47:31.079 INFO c.k.k.c.webui.common.WebUiCommonHelper - Unable to find the element located by ‘By.xpath: //lightning-base-combobox-item[@role = ‘option’ and (text() = ‘Information request’ or . = ‘Information request’)]’. Please recheck the objects properties to make sure the desired element is located.
2023-04-03 11:47:31.080 WARN c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed to find element with id ‘Object Repository/A trier/Create Case/Page_New Case Generic Salesforce/lightning-base-combobox-item_Information request’. Try using Self-healing.
2023-04-03 11:47:32.327 INFO c.k.k.c.webui.common.WebUiCommonHelper - Unable to find the element located by ‘By.xpath: (.//[normalize-space(text()) and normalize-space(.)=‘–None–’])[2]/following::lightning-base-combobox-item[1]'. Please recheck the objects properties to make sure the desired element is located.
2023-04-03 11:47:32.657 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: '(.//
[normalize-space(text()) and normalize-space(.)=’–None–‘])[2]/following::lightning-base-combobox-item[1]’.
2023-04-03 11:47:32.969 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: ‘(.//[normalize-space(text()) and normalize-space(.)=‘–None–’])[1]/following::lightning-base-combobox-item[2]'.
2023-04-03 11:47:33.302 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: '(.//
[normalize-space(text()) and normalize-space(.)=‘Customer account / Loyalty account’])[10]/preceding::lightning-base-combobox-item[1]’.
2023-04-03 11:47:34.035 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: ‘//lightning-base-combobox-item[@id=‘combobox-button-528-1-528’]’.
2023-04-03 11:47:34.346 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: ‘//div[@id=‘dropdown-element-528’]/lightning-base-combobox-item[2]’.
2023-04-03 11:47:34.648 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: ‘//lightning-base-combobox-item[2]’.
2023-04-03 11:47:34.945 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: ‘//lightning-base-combobox-item[@id = ‘combobox-button-528-1-528’ and (text() = ‘Information request’ or . = ‘Information request’)]’.
2023-04-03 11:47:36.120 INFO c.k.k.c.webui.common.WebUiCommonHelper - Unable to find the element located by ‘By.cssSelector: #combobox-button-528-1-528’. Please recheck the objects properties to make sure the desired element is located.
2023-04-03 11:47:36.137 WARN k.k.c.w.k.b.WaitForElementVisibleKeyword - Web element with id: ‘Object Repository/A trier/Create Case/Page_New Case Generic Salesforce/lightning-base-combobox-item_Information request’ located by ‘//lightning-base-combobox-item[@role = ‘option’ and (text() = ‘Information request’ or . = ‘Information request’)]’ not found
2023-04-03 11:47:36.138 DEBUG t.b.TC - Create a case from case object - 14: delay(2)
2023-04-03 11:47:38.147 DEBUG t.b.TC - Create a case from case object - 15: com.ari.utils.clickJS.clickElement(findTestObject(“Object Repository/A trier/Create Case/Page_New Case Generic Salesforce/lightning-base-combobox-item_Information request”), 10)
2023-04-03 11:47:39.422 INFO c.k.k.c.webui.common.WebUiCommonHelper - Unable to find the element located by ‘By.xpath: //lightning-base-combobox-item[@role = ‘option’ and (text() = ‘Information request’ or . = ‘Information request’)]’. Please recheck the objects properties to make sure the desired element is located.
2023-04-03 11:47:39.423 WARN c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed to find element with id ‘Object Repository/A trier/Create Case/Page_New Case Generic Salesforce/lightning-base-combobox-item_Information request’. Try using Self-healing.
2023-04-03 11:47:40.725 INFO c.k.k.c.webui.common.WebUiCommonHelper - Unable to find the element located by ‘By.xpath: (.//[normalize-space(text()) and normalize-space(.)=‘–None–’])[2]/following::lightning-base-combobox-item[1]'. Please recheck the objects properties to make sure the desired element is located.
2023-04-03 11:47:41.043 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: '(.//
[normalize-space(text()) and normalize-space(.)=’–None–‘])[2]/following::lightning-base-combobox-item[1]’.
2023-04-03 11:47:41.354 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: ‘(.//[normalize-space(text()) and normalize-space(.)=‘–None–’])[1]/following::lightning-base-combobox-item[2]'.
2023-04-03 11:47:41.684 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: '(.//
[normalize-space(text()) and normalize-space(.)=‘Customer account / Loyalty account’])[10]/preceding::lightning-base-combobox-item[1]’.
2023-04-03 11:47:41.997 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: ‘//lightning-base-combobox-item[@id=‘combobox-button-528-1-528’]’.
2023-04-03 11:47:42.311 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: ‘//div[@id=‘dropdown-element-528’]/lightning-base-combobox-item[2]’.
2023-04-03 11:47:42.620 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: ‘//lightning-base-combobox-item[2]’.
2023-04-03 11:47:42.916 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: ‘//lightning-base-combobox-item[@id = ‘combobox-button-528-1-528’ and (text() = ‘Information request’ or . = ‘Information request’)]’.
2023-04-03 11:47:44.092 INFO c.k.k.c.webui.common.WebUiCommonHelper - Unable to find the element located by ‘By.cssSelector: #combobox-button-528-1-528’. Please recheck the objects properties to make sure the desired element is located.
2023-04-03 11:47:44.095 WARN k.k.c.w.k.b.WaitForElementVisibleKeyword - Web element with id: ‘Object Repository/A trier/Create Case/Page_New Case Generic Salesforce/lightning-base-combobox-item_Information request’ located by ‘//lightning-base-combobox-item[@role = ‘option’ and (text() = ‘Information request’ or . = ‘Information request’)]’ not found
2023-04-03 11:47:45.306 INFO c.k.k.c.webui.common.WebUiCommonHelper - Unable to find the element located by ‘By.xpath: //lightning-base-combobox-item[@role = ‘option’ and (text() = ‘Information request’ or . = ‘Information request’)]’. Please recheck the objects properties to make sure the desired element is located.
2023-04-03 11:47:45.306 WARN c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed to find element with id ‘Object Repository/A trier/Create Case/Page_New Case Generic Salesforce/lightning-base-combobox-item_Information request’. Try using Self-healing.
2023-04-03 11:47:46.336 INFO c.k.k.c.webui.common.WebUiCommonHelper - Unable to find the element located by ‘By.xpath: (.//[normalize-space(text()) and normalize-space(.)=‘–None–’])[2]/following::lightning-base-combobox-item[1]'. Please recheck the objects properties to make sure the desired element is located.
2023-04-03 11:47:46.644 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: '(.//
[normalize-space(text()) and normalize-space(.)=’–None–‘])[2]/following::lightning-base-combobox-item[1]’.
2023-04-03 11:47:46.957 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: ‘(.//[normalize-space(text()) and normalize-space(.)=‘–None–’])[1]/following::lightning-base-combobox-item[2]'.
2023-04-03 11:47:47.270 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: '(.//
[normalize-space(text()) and normalize-space(.)=‘Customer account / Loyalty account’])[10]/preceding::lightning-base-combobox-item[1]’.
2023-04-03 11:47:47.569 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: ‘//lightning-base-combobox-item[@id=‘combobox-button-528-1-528’]’.
2023-04-03 11:47:47.881 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: ‘//div[@id=‘dropdown-element-528’]/lightning-base-combobox-item[2]’.
2023-04-03 11:47:48.179 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: ‘//lightning-base-combobox-item[2]’.
2023-04-03 11:47:48.472 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed Locator: ‘//lightning-base-combobox-item[@id = ‘combobox-button-528-1-528’ and (text() = ‘Information request’ or . = ‘Information request’)]’.
2023-04-03 11:47:49.640 INFO c.k.k.c.webui.common.WebUiCommonHelper - Unable to find the element located by ‘By.cssSelector: #combobox-button-528-1-528’. Please recheck the objects properties to make sure the desired element is located.
2023-04-03 11:47:49.844 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Unable to click on object ‘Object Repository/A trier/Create Case/Page_New Case Generic Salesforce/lightning-base-combobox-item_Information request’ (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/A trier/Create Case/Page_New Case Generic Salesforce/lightning-base-combobox-item_Information request’
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:74)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:40)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:620)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$3.call(Unknown Source)
at com.ari.utils.clickJS.clickElement(clickJS.groovy:53)
at com.ari.utils.clickJS.invokeMethod(clickJS.groovy)
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:55)
at b.TC - Create a case from case object.run(b.TC - Create a case from case object:50)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:448)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
at com.kms.katalon.core.common.CommonExecutor.accessTestCaseMainPhase(CommonExecutor.java:65)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:148)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:106)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:187)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1680515164510.run(TempTestSuite1680515164510.groovy:36)
Caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/A trier/Create Case/Page_New Case Generic Salesforce/lightning-base-combobox-item_Information request’ located by ‘//lightning-base-combobox-item[@role = ‘option’ and (text() = ‘Information request’ or . = ‘Information request’)]’ not found
at com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(WebUiCommonHelper.java:1376)
at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:27)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.doCall(ClickKeyword.groovy:65)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.call(ClickKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:74)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:40)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:620)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$3.call(Unknown Source)
at com.ari.utils.clickJS.clickElement(clickJS.groovy:53)
at com.ari.utils.clickJS.invokeMethod(clickJS.groovy)
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:55)
at Script1679927182304.run(Script1679927182304.groovy:50)
… 13 more
)
2023-04-03 11:47:49.848 ERROR k.k.c.m.CustomKeywordDelegatingMetaClass - :x: No such property: WebUiCommonHelper for class: com.ari.utils.clickJS
2023-04-03 11:47:49.849 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/02.SFSC - Case Management/b.TC - Create a case from case object FAILED.
Reason:
com.kms.katalon.core.exception.StepErrorException: groovy.lang.MissingPropertyException: No such property: WebUiCommonHelper for class: com.ari.utils.clickJS
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.throwError(CustomKeywordDelegatingMetaClass.java:101)
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:73)
at b.TC - Create a case from case object.run(b.TC - Create a case from case object:50)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:448)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
at com.kms.katalon.core.common.CommonExecutor.accessTestCaseMainPhase(CommonExecutor.java:65)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:148)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:106)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:187)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1680515164510.run(TempTestSuite1680515164510.groovy:36)
Caused by: groovy.lang.MissingPropertyException: No such property: WebUiCommonHelper for class: com.ari.utils.clickJS
at com.ari.utils.clickJS.clickElement(clickJS.groovy:57)
at com.ari.utils.clickJS.invokeMethod(clickJS.groovy)
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:55)
… 14 more

2023-04-03 11:47:49.850 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/02.SFSC - Case Management/b.TC - Create a case from case object FAILED.
Reason:
groovy.lang.MissingPropertyException: No such property: WebUiCommonHelper for class: com.ari.utils.clickJS
at com.ari.utils.clickJS.clickElement(clickJS.groovy:57)
at com.ari.utils.clickJS.invokeMethod(clickJS.groovy)
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:55)
at b.TC - Create a case from case object.run(b.TC - Create a case from case object:50)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:448)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
at com.kms.katalon.core.common.CommonExecutor.accessTestCaseMainPhase(CommonExecutor.java:65)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:148)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:106)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:187)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1680515164510.run(TempTestSuite1680515164510.groovy:36)

I have tried self healing proposal and it does not work.

It is urgent, thanks for your help.

Katalon states that it will help you:

I am expert in Katalon.
The problem is that the object can not be recorded.
Please see my error.log before give me a link.

Salesforce does not look compatible with katalon …
It is a major issue and the fact that Katalon says it is possible is totally false.

Do you have the import statement at the top of your TestCase for WebUiCommonHelper? Perhaps, you can hit the three key combo, CTRL + SHIFT + O (oh), to import all your needed statements (and remove those that you don’t need).

Do this in your KeyWords as well, such as com.ari.utils.