Verify text is failing with below error in logs

Am trying to automate as per test case Test Authoring With Katalon: Data-Driven Testing - Katalon Academy
But am getting error in last verify element part of recording
Pls. help
=============== ROOT CAUSE =====================
Caused by: com.kms.katalon.core.exception.StepFailedException: Actual text 'Search results

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html

06-29-2023 07:43:48 PM Test Cases/Data driven testing/Find a place

Elapsed time: 51.462s

Test Cases/Data driven testing/Find a place FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Verify element text of test object ‘Object Repository/Air BNB Pages/Page_search/span_Search resultsOver 1,000 places in Atlanta’ FAILED.
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.VerifyElementTextKeyword.verifyElementText(VerifyElementTextKeyword.groovy:72)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementTextKeyword.execute(VerifyElementTextKeyword.groovy:40)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementText(WebUiBuiltInKeywords.groovy:4749)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$verifyElementText$3.call(Unknown Source)
at Find a place.run(Find a place:39)
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.main.TestCaseMain.runTestCase(TestCaseMain.java:144)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:135)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1688048023591.run(TempTestCase1688048023591.groovy:25)
Caused by: com.kms.katalon.core.exception.StepFailedException: Actual text ‘Search results
Over 1,000 places in Atlanta’ and expected text ‘Search resultsOver 1,000 places in Atlanta’ of test object ‘Object Repository/Air BNB Pages/Page_search/span_Search resultsOver 1,000 places in Atlanta’ are NOT matched.
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementTextKeyword$_verifyElementText_closure1.doCall(VerifyElementTextKeyword.groovy:57)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementTextKeyword$_verifyElementText_closure1.call(VerifyElementTextKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
… 17 more

1 Like

The Actual text does not match what you expected the text to be. Is there a “new line” character after “Search results” or is that just a copy and paste oops that was made getting the text into the forum. Copy the whole statement in your Test Case and paste it as the next line and add a new line character after the “Search results” ( like Search results\nOver 1,000... ) in your “Expected results” and see if that works. Or copy and paste your Actual text into NotePad++ or some other advanced text GUI and see if there is any unprintable characters within the text. Other characters could be \v or \R or …

1 Like