CHECK POINTS or FUNCTIONS or VALIDATIONS:
Check Points: To validate the data on a web page use the below 2
types of check points in LOAD RUNNER script.
1.
Text Check Point
2.
Image Check
Point
Text Check Point: To validate the
text on a web page, we use the below type of text check points.
i)
web_reg_find( ): It verifies the given text on a web page and it returns the count of
the given text using a SaveCount argument.
Syntax:
Web_reg_find(“Text=Username”,
“SaveCount=Test1”, LAST);
Web_url(“…………………………………………..
…………………………………………
…………………………………………”);
Web_find(“Textcheck”,
“What=(Required
text to be find, Here eg: Username)”,
LAST);
i)
web_find( ): It verifies the given text on a web page.
Syntax:
Web_find(“Textcheck”,
“What=(Required text to be find, Here eg: Username)”,
LAST);
ii)
web_global_verification: It verifies the given text globally in all the web request in all the
web pages.
Syntax: web_global_verification(“Text=(Required text to be find, Here eg: To)”,
“Fail = NotFound”,
LAST);
Difference between web_reg_find, web_find and
web_global_verification:
web_reg_find
|
web_find
|
web_global_verification
|
1.
By default it
records the function during the script recording with the corresponding page
title
|
1.
We need to
insert this function after the recording with the corresponding text on a web
page
|
1.
We need to
insert this function after the recording of the script with the global text
in all the web pages
|
2.
Insert this
function just before each http web request
|
2.
Insert this
function after each http web request
|
2.
Insert this
function at the beginning of the script to verify in all the subsequent
(i.e., next) http web request.
|
3.
No need to
enable any option to validate the text at run time setting
|
3.
We need to
enable Image and Text Check in run time setting--->
Preferences option to validate the text
|
3.
No need to
enable any option to validate the text at runtime settings
|
Image Check Point: It is used to verify the images on a web page.
Syntax: web_image_check(“Step Name”,
“src=(Image to be check, copy the source
code in View source)”,
LAST);
Eg: web_image_check(“ImageCheck”,
“src=images/hp_logo.png”,
LAST);
Comments
Post a Comment