ServiceNow ATF(Assert Text on Page (Custom UI))

Soumya12
Kilo Contributor

In ATF while using 'Assert Text on Page (Custom UI)' test step to assert a Text which contains single quotes, test is getting failed stating not on page even when the text is present on the page.

For example : In portal there is text "Welcome to Portal! We're excited to have you join our team" .

I tried to Assert this text with the proper test step getting failure saying 

FAILURE: Text 'Welcome to Portal! We're excited to have you join our team' was not on the page.

As an work around i also tried with escape character still did not work.

Does any one faced this issue? if there is any solution please let me know.

 

16 REPLIES 16

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Did you try to escape the quotes like this

use backslash character and check once

Welcome to Portal! We\'re excited to have you join our team

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

 

Yes i tried this as well using backslash character.

Welcome to Portal! We\'re excited to have you join our team.

Getting same failure:

FAILURE: Text 'Welcome to Portal! We\'re excited to have you join our team' was not on the page.

 

Thanks and Regards,

Soumya.R

What if you just search this if that works?

excited to have you join our team

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

Thanks for your quick response.

Search will not be feasible as i'm trying to verify text/description present within eform(Record Producer description) post opening the Record producer in portal.

Regards,

Soumya.