As the name specified, text check is used to verify the presence of a word or string in the response coming from the server. It is a good practice to have a text check for each page in web script. In this article, you will get to know how and which text you can use as a ‘text check’ in LoadRunner.
How to add text check during recording?
1. While recording the script, select the text that you want to use as a text check on the web page.
2. Click the ‘Insert Text Check’ button on the VuGen floating bar.
3. web_reg_find() function containing selected text, will be added in the script. VuGen always inserts the text check function (i.e. web_reg_find) before the web page request having the selected text. The placement for text check function in the script is as same as the correction functions.
Which word/string can be a text check?
The content check function should contain a check text (word or string) which comes correctly in the response while executing the scenario. You can choose any unique word or string as a text content check appears on the page. In case your page is divided into many frames then use the text appeared in the latest updated frame. Now, let’s have a look at the ‘Web Tours’ site and see how to select a text for a content check on each page:
a. Browse the URL
Text check could be: Welcome to the Web Tours site
Text check could be: Welcome,
c. Click ‘Flights’
Text check could be: Find Flight
d. Select a flight
Text check could be: Flight departing
e. Payment Page
Text check could be: Payment Details
f. Invoice Page
Text check could be: Thank You
Refer to the GIF illustration for the above flow to add the text check in the LoadRunner (VuGen) script:
1. Check the ‘Enable image and text checks’ before replaying the script.
Runtime Settings -> Internet Protocol -> Preferences -> Checks -> Enable image and text checks
You may be interested: