hi, u need to give proper xpath.First take the xpath from firebug,then go to Object repository ,then go to that page ,double click on the element which is giving error(“Element not found”),then right side “Add”>>Xpath>>paste the xpath,then “Ok”
I tried the same,i copied the xpath of that particular element,after that i opened Object Repository/demorecord/Page_Swan Silk (1)/span_New Stores,and i select xpath n saved.
Unable to click on object ‘Object Repository/demorecord/Page_Swan Silk (1)/span_New Stores’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/demorecord/Page_Swan Silk (1)/span_New Stores’ located by ‘By.xpath: //span[count(. | //[text() = ‘New Stores’]) = count(//[text() = ‘New Stores’])][count(. | html/body/div[3]/div[1]/div/ul/li[4]/a) = count(html/body/div[3]/div[1]/div/ul/li[4]/a)]’ not found)
This is a common problem that your element (Object Repository/demorecord/Page_Swan Silk (1)/span_New Stores)'s xpath is not correct. You need to correct it and replace with new xpath value in Test Object View
Tips for dummy user when identifing xpath:
1.Open your page using Chrome.
2.Right-click on your desired test object -> choose Inspect Element.
3.In Chrome’s Elements tab, right-click on the focused object, choose Copy -> Copy XPath.
4.Open your test object in Katalon, modify xpath property with the coppied value.
Hi, I m having a problem using clickOffset in a loop, as it is trying to locate the object in a frame using By.xpath even though I have unchecked them in the ‘detect object by’ .
Hi duyluong,
I have same error. I edited xpath . But issue not fixed.
Error :
07-25-2019 03:00:46 PM Test Cases/Testcase 1
Elapsed time: 1m - 10.562s
Test Cases/Testcase 1 FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to set text ‘Test 25/07/2019’ of object ‘Object Repository/Page_Service infra management/textarea_Add New Virtual Server_form-control ng-untouched ng-valid ng-dirty’
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.SetTextKeyword.setText(SetTextKeyword.groovy:66)
at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.execute(SetTextKeyword.groovy:37)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.setText(WebUiBuiltInKeywords.groovy:950)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$setText$0.call(Unknown Source)
at Testcase 1.run(Testcase 1:22)
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:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1564041641244.run(TempTestCase1564041641244.groovy:21)
Caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_Service infra management/textarea_Add New Virtual Server_form-control ng-untouched ng-valid ng-dirty’ located by ‘By.xpath: (.//*[normalize-space(text()) and normalize-space(.)=‘Add New Virtual Server’])[1]/following::textarea[1]’ not found
at com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(WebUiCommonHelper.java:1097)
at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:27)
at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword$_setText_closure1.doCall(SetTextKeyword.groovy:51)
at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword$_setText_closure1.call(SetTextKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
… 17 more