verifyTextPresent stopped working

I have been using Katalon Studio for several years now.
I have had one project to regularly test my web app.
Now I have come back to it after a few months, and some tests mysteriously fail, and it looks like a bug to me:

Excerpt of the HTML page source:

Renewal Notice

Test script command:

WebUI.verifyTextPresent(‘Renewal Notice’, false)

Error Message:

Test Cases/Registered User/Register FAILED.
com.kms.katalon.core.exception.StepFailedException: Unable to verify text ‘Renewal Notice’ is present

This test has worked for years, and has now stopped working. It is one among several similar ones.

One thing I am wondering: the HTML element in which the above “H1” Element is located, is dynamically created via javascript. That’s why I preceded the verify command by a WebUI.delay(10) for good measure.

What else should I be looking for?

Katalon Studio version 8.4.1

How aβout waiting for longer time; such as 600 seconds?

1 Like

I’d try WebUI.delay(30) to start. Maybe try using WebUI.verifyTextPresent() to verify some other text on the page to confirm or rule out that WebUI.verifyTextPresent is the issue.

As you said, you have come back to it after a few months.
First you should check object repository for “Renewal Notice”, may be has been changed.
second, if object repository is correct then you should try to use gettext OR getAttribute method to get text and store a variable and also print value into console.
Third one you can try > waitForElementVisible(findTestObject(“Object Repository/Renewal Notice”), 100, CONTINUE_ON_FAILURE)
WebUI.verifyTextPresent(‘Renewal Notice’, false)