How to check the text is displayed as expected

How can I check the text is displayed as expected on the webpage?

Hi Bikdys,

What do you mean by this?

Is it verify if present or visible?
Is the text correct?
Is the position correct?

What?? Could you provide enough information?

And by the way, this community doesn’t tolerate that kind of posting, lack of information.
If you really want help then provide enough information for us to refer no matter how simple
your problem is.

Thanks.

Thanks for checking the post. @Arnel
I’d like to check the text is correct.

Thanks.

Hi Bikdyz,

Try this. . .

String text = WebUI.getText(findTestObject("your_test_object"))
WebUI.verifyEqual(text, "your_expected_text_as_string")

//or this
WebUI.verifyElementText(findTestObject("your_test_object"), "your_expected_text _as_string"))

Hope that helps. . . :slight_smile:

1 Like

Thank you! @Arnel
It worked well. :star_struck:

Cool! you’re welcome

Cheers! :beers: