What is web_reg_find?

Please Like Us!!!

LoadRunner Interview Questions

Q: What is web_reg_find?
A: web_reg_find is used to register a request to search for a text string on a web page.

Syntax:
int web_reg_find( const char *attribute_list, LAST );

Example:
1) web_reg_find(“Text=Googly”, LAST );
In the above example, web_reg_find would search for text Googly in the response from subsequent request.

2) web_reg_find(“Text=Desi”,”SaveCount=srchcnt”,LAST);
In the above example, web_reg_find would search for text Desi in the response from subsequent request and save the count of matches in variable ‘srchcnt’.

3) web_reg_find(“Text=Error”, “Fail=Found”, LAST );
In the above example, web_reg_find would search for text error in the response from sbusequent request, if the text is found the execution would fail for current iteration.

4) web_reg_find(“TextPfx=Error number”,”TextSfx=occured”, LAST );
In the above example, web_reg_find would search for text starting with ‘Error number’ and ending with text ‘occured’. TextPfx indicates Text Prefix and TextSfx indicates Text Suffix.

Reviews & Comments

Enjoy!