Unable to verify object is present

Hi everyone,

I cannot verify the below element is present. Please help me!
Thanks!

Object:

Katalon’s log:
2019-07-22 01:01:07.780 WARN c.k.k.core.testobject.ObjectRepository - Test object with id ‘Object Repository/ProductDetails/Tile’ does not exist
2019-07-22 01:01:07.797 WARN c.k.k.core.testobject.ObjectRepository - Test object with id ‘Object Repository/’ does not exist
2019-07-22 01:01:08.370 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Unable to verify object is present (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to verify object is present
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.VerifyElementPresentKeyword.verifyElementPresent(VerifyElementPresentKeyword.groovy:92)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword.execute(VerifyElementPresentKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementPresent(WebUiBuiltInKeywords.groovy:1434)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$verifyElementPresent$12.call(Unknown Source)
at common.common.verifyElementPresent(common.groovy:118)
at common.common$verifyElementPresent$5.call(Unknown Source)
at CECL-5_ProductDetailsWithProductIsStocking.run(CECL-5_ProductDetailsWithProductIsStocking:84)
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 TempTestCase1563732027847.run(TempTestCase1563732027847.groovy:21)
Caused by: java.lang.IllegalArgumentException: Object is null
at com.kms.katalon.core.helper.KeywordHelper.checkTestObjectParameter(KeywordHelper.java:33)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword$_verifyElementPresent_closure1.doCall(VerifyElementPresentKeyword.groovy:76)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword$_verifyElementPresent_closure1.call(VerifyElementPresentKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword.verifyElementPresent(VerifyElementPresentKeyword.groovy:92)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword.execute(VerifyElementPresentKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementPresent(WebUiBuiltInKeywords.groovy:1434)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$verifyElementPresent$12.call(Unknown Source)
at common.common.verifyElementPresent(common.groovy:118)
at common.common$verifyElementPresent$5.call(Unknown Source)
at Script1563551758444.run(Script1563551758444.groovy:84)
… 11 more
)
2019-07-22 01:01:08.373 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/Product Details/CECL-5_ProductDetailsWithProductIsStocking FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to verify object is present
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.VerifyElementPresentKeyword.verifyElementPresent(VerifyElementPresentKeyword.groovy:92)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword.execute(VerifyElementPresentKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementPresent(WebUiBuiltInKeywords.groovy:1434)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$verifyElementPresent$12.call(Unknown Source)
at common.common.verifyElementPresent(common.groovy:118)
at common.common$verifyElementPresent$5.call(Unknown Source)
at CECL-5_ProductDetailsWithProductIsStocking.run(CECL-5_ProductDetailsWithProductIsStocking:84)
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 TempTestCase1563732027847.run(TempTestCase1563732027847.groovy:21)
Caused by: java.lang.IllegalArgumentException: Object is null
at com.kms.katalon.core.helper.KeywordHelper.checkTestObjectParameter(KeywordHelper.java:33)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword$_verifyElementPresent_closure1.doCall(VerifyElementPresentKeyword.groovy:76)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword$_verifyElementPresent_closure1.call(VerifyElementPresentKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)

1 Like

Your error isn’t about not finding an element on the page. It’s that Katalon can’t find the Test Object at the specified location.

Please check that you have a Test Object defined at Object Repository/ProductDetails/Tile

1 Like

My object is Xpath = “//*[contains(text(),‘Thông tin cửa hàng’)]”. I checked again in browser/developer tool, this xpath is still work. But, when running katalon, still get error as above.

You are confusing your xpath with a Test Object. Please review my original reply.

1 Like

Please pay attention to what Brandon is telling you.

That’s not the problem. You need to check in Katalon your Test Object in the Object Repository.

‘Object Repository/ProductDetails/Tile’ does NOT EXIST.

1 Like

I switched Manual tab and Script tab in Katalon, my test case passed without modifying any. Because before that, I set Script tab is the view as default. So magic! My issue resolved.

Thanks all!

2 Likes