Quantcast
Channel: All LoadRunner Practitioners Forum posts
Viewing all articles
Browse latest Browse all 12134

Re: Unable to use local variable in web_submit_data

$
0
0

You have to convert the int into a LoadRunner parameter and then do paramaterization, like this:

 

int SeatNo=35;

 

lr_save_intSeatNo, "SeatNoParameter");

 

web_submit_data("default.aspx",
 "Action=http://lazarus/flightnet/default.aspx",
 "Method=POST",
 "TargetFrame=",
 "RecContentType=text/html",
 "Referer=http://lazarus/flightnet/",
 "Snapshot=t7.inf",
 "Mode=HTML",
 ITEMDATA,
 "Name=SeatNumber", "Value={SeatNoParameter}", ENDITEM,
 "Name=SeatLoc", "Value=", ENDITEM,
 LAST );



 

Or you could just do this without the initial declaration:

 

lr_save_int( 35, "SeatNoParameter");

 

web_submit_data("default.aspx",
 "Action=http://lazarus/flightnet/default.aspx",
 "Method=POST",
 "TargetFrame=",
 "RecContentType=text/html",
 "Referer=http://lazarus/flightnet/",
 "Snapshot=t7.inf",
 "Mode=HTML",
 ITEMDATA,
 "Name=SeatNumber", "Value={SeatNoParameter}", ENDITEM,
 "Name=SeatLoc", "Value=", ENDITEM,
 LAST );

 

 

Or you could just make a parameter file and do it that way. Depends on where you're getting the data from.

 

 

 

 


Viewing all articles
Browse latest Browse all 12134

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>