Your error message says you have an id attribute that it is trying to use. Do you have more than tag and xpath checked to be used as “Detect by” or do you have the whole galaxy? Remove the check in the “Detect by” column except for the two I suggested and try again. (Actually, delete all others except for the two I suggested/)
Since “path” is not the same as "//button[@title='Edit Reason for Change']", I think you are leaving a lot out. How about filling the puzzle in so we can follow what you are trying to do?
Okay, so your xpath looks like it should work. Again, how does the error message say one thing and your xpath another? How are you using it? Do you have the xpath in an element within the Object Repository or are you trying to create an element dynamically or…?
And you say it is not working. How about trying the below?
WebUI.waitForElementClickable(findTestObject('mypath/button_Edit Reason for Change'), 10)
WebUI.enhancedClick(findTestObject('mypath/button_Edit Reason for Change'))
Code i have used
WebUI.waitForElementClickable(findTestObject(‘Object Repository/CALARM-432/CALARM-934/Page_Additional information section/Edit_Button’),
10)
WebUI.enhancedClick(findTestObject)(findTestObject(‘Object Repository/CALARM-432/CALARM-934/Page_Additional information section/Edit_Button’))
Error i am getting:
7:28.822 ERROR c.k.katalon.core.main.TestCaseExecutor - Test Cases/CALARM-432/TC35_CALARM-1239_Scenario 2 FAILED.
Reason:
groovy.lang.MissingPropertyException: No such property: findTestObject for class: Script1670550469953
at TC35_CALARM-1239_Scenario 2.run(TC35_CALARM-1239_Scenario 2:79)
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:442)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:433)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:412)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:404)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:281)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:202)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:164)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:105)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:185)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1670691374386.run(TempTestSuite1670691374386.groovy:36)
2022-12-10 08:57:28.830 ERROR c.k.katalon.core.main.TestCaseExecutor - Test Cases/CALARM-432/TC35_CALARM-1239_Scenario 2 FAILED.
Reason:
groovy.lang.MissingPropertyException: No such property: findTestObject for class: Script1670550469953
at TC35_CALARM-1239_Scenario 2.run(TC35_CALARM-1239_Scenario 2:79)
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:442)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:433)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:412)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:404)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:281)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:202)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:164)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:105)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:185)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1670691374386.run(TempTestSuite1670691374386.groovy:36)
ohh gosh…i missed to notice the type…thank you so much…it Worked but still the error displays :
2022-12-10 09:20:00.306 INFO c.k.k.c.webui.common.WebUiCommonHelper - Unable to find the element located by 'By.xpath: //button[@title=‘Edit Reason for Change’] '. Please recheck the objects properties to make sure the desired element is located.
2022-12-10 09:20:00.307 WARN c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Failed to find element with id ‘Object Repository/CALARM-432/CALARM-934/Page_Additional information section/Edit_Button’. Try using Self-healing.
2022-12-10 09:20:01.330 INFO c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] No working XPath is found.
2022-12-10 09:20:02.357 INFO c.k.k.c.webui.common.WebUiCommonHelper - Unable to find the element located by 'By.xpath: '. Please recheck the objects properties to make sure the desired element is located.
2022-12-10 09:20:02.365 WARN c.k.k.c.webui.common.WebUiCommonHelper - [SELF-HEALING] Cannot find elements when the selector is null
2022-12-10 09:20:02.391 WARN k.c.w.k.b.WaitForElementClickableKeyword - Web element with id: ‘Object Repository/CALARM-432/CALARM-934/Page_Additional information section/Edit_Button’ located by '//button[@title=‘Edit Reason for Change’] ’ not found
Do you have an <iframe> tag above the HTML area you show us? If you do, you have to move to it as a step. You can see more about that on this forum if that is the case.