# Issue with verify showing same values but showing as failed

**URL:** <https://forum.katalon.com/t/issue-with-verify-showing-same-values-but-showing-as-failed/27480>\
**Category:** Bug Report\
**Tags:** bugs-report, katalon-studio\
**Created:** [June 11, 2019, 3:27pm UTC](https://forum.katalon.com/t/issue-with-verify-showing-same-values-but-showing-as-failed/27480 "2019-06-11T15:27:15Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [June 7, 2020, 4:36am UTC](https://forum.katalon.com/t/issue-with-verify-showing-same-values-but-showing-as-failed/27480/7 "2020-06-07T04:36:01Z")

</div>

It is likely that a text extracted from HTML is prepended/appended with whitespace characters (space,CR,LF,TAB). You should trim those whitespaces before making a strict assertion:

```auto
def expected = "Unpaid"
def actual = WebUI.getText(findTestObject("Page_MyLicense Office -admin/FeeStatusUnpaid"))
assert actual.trim().equals(expected)

```

Or alternatively use `.contains()` rather than `.equals()` for a tolerant assertion.

```auto
def expected = "Unpaid"
def actual = WebUI.getText(findTestObject("Page_MyLicense Office -admin/FeeStatusUnpaid"))
assert actual.contains(expected)

```

Sometimes Non-breaking space character(or [&nbsp;](https://www.w3schools.com/html/html_entities.asp) \u00a0 in UNICODE) in HTML make things more complicated.

> [@WebUI.getText not trimming trailing space](http://forum.katalon.com/t/webui-gettext-not-trimming-trailing-space/25054):
>
> I’ve come across an issue where WebUI.getText is not able to trim the trailing space in actual text. The actual text rendered in webpage HTML has &nbsp at the end. This is causing the trailing space. I thought WebUI.getText will take care of it but it didn’t work. Example: Actual Text in webpage HTML: sample text 1&nbsp Actual Text grabbed by WebUI.getText : "sample text 1 " Expected Text in Test Case: “sample text 1” Expected Fix: WebUI.getText must remove all leading and trail…

---

_[View the full topic](https://forum.katalon.com/t/issue-with-verify-showing-same-values-but-showing-as-failed/27480)._
