QA And PE

This blog discuss the various topics associated with software testing and software automation using automated tools such as QTP. You are most welcome to share topics related to software testing or comment on any topic below

Thursday, April 16, 2009

LR - web_reg_find Function

Load Runner - 
When you perform load testing, you have to be fully confident, that your application works correctly. It may be very usefull to check UI of application - is it shown correctly or not.

This verification could be done using web_reg_find function

Please, note:
web_reg_find function has been added before the page opening function (web_url)!
This is because LoadRunner web_reg_find function does not search for text on a page, it just registers a search request for a text string on an HTML page.

This is very important and I would like to pay your attention - web_reg_find function should be placed before the function, which loads a page.

Example: 
// Set up check for successful login by looking for "Welcome" 
       web_reg_find("Text=Welcome", "SaveCount=Welcome_Count", LAST); 
// Now log in 
       web_submit_form("login.pl", ...................

// Check result 
       if (atoi(lr_eval_string("{Welcome_Count}")) > 0)
{lr_output_message("Log on successful."); } 
        else
{ lr_error_message("Log on failed"); 
          return(0);    } 
  

Labels:

0 Comments:

Post a Comment

<< Home