# Unable to verify text on page using WebUI.verifyTextPresent

**URL:** <https://forum.katalon.com/t/unable-to-verify-text-on-page-using-webui-verifytextpresent/98435>\
**Category:** Miscellaneous\
**Created:** [October 4, 2023, 11:56pm UTC](https://forum.katalon.com/t/unable-to-verify-text-on-page-using-webui-verifytextpresent/98435 "2023-10-04T23:56:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Evers](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dave_evers/32/435_2.png) [@Dave\_Evers](https://forum.katalon.com/u/Dave_Evers)\
**Post date:** [October 4, 2023, 11:56pm UTC](https://forum.katalon.com/t/unable-to-verify-text-on-page-using-webui-verifytextpresent/98435/1 "2023-10-04T23:56:03Z")

</div>

Hi Folks, I am trying to validate text on a page where the element does not have a ‘value=xxx’ attribute. The text ‘FundName001’ and ‘FundName002’ as well as other entered data values display on the page but the following is not finding the text. I have tried several things to assert/validate the text but no luck so far… Has anyone dealt with this type of issue? Note: There are no iframes on this page.

HTML Element value:

```auto
<input id="fundName0" name="activePacFundEntities[0].fundName" placeholder="Fund name" required="" type="text" maxlength="40">

```

Test case:

```auto
//Test steps that create the data for the page... 
WebUI.delay(2)
WebUI.verifyTextPresent('FundName001', false)
WebUI.verifyTextPresent('FundName002', false)

```

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/5/3/5309ebcd19589cc6f6c76763f239b2f613bc570f.png)

---

<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:** [October 5, 2023, 2:27am UTC](https://forum.katalon.com/t/unable-to-verify-text-on-page-using-webui-verifytextpresent/98435/2 "2023-10-05T02:27:12Z")

</div>

Possibly the text “FundName001” is not visible as a part of DOM. Therefore WebUI.verifyTextPresent does not help.

Possibly you need to write JavaScript to get access to the text “FundName001” out of the `<input>` elements.

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [October 5, 2023, 4:39am UTC](https://forum.katalon.com/t/unable-to-verify-text-on-page-using-webui-verifytextpresent/98435/3 "2023-10-05T04:39:25Z")

</div>

> [@Dave\_Evers](#):
>
> does not have a ‘value=xxx’ attribute

Which, if you weren’t aware, is the value sent to the page from the server. The value that is sent _back_ to the server, comes from the `element.value` _property_. In other words, you don’t want the attribute, you want the _property_. Testing docs tend to fuzzy up the distinction between the two, but for you, just do what Kaz hinted at:

```javascript
String js = "return document.querySelector('#fundName0').value;"
String value = WebUI.executeJavaScript(js, null)

```

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [October 5, 2023, 5:00am UTC](https://forum.katalon.com/t/unable-to-verify-text-on-page-using-webui-verifytextpresent/98435/4 "2023-10-05T05:00:25Z")

</div>

Or perhaps because the element is an **input** tag you can see if the below works:

```auto
item = com.Tools.createTestObject('id("fundName0")')
WebUI.verifyElementAttributeValue(item, "value", "FundName001", 10)

```
