Re: LoadRunner C#.NET Vuser (146 Views)
Reply
Occasional Advisor
PhuongNguyen
Posts: 9
Registered: ‎03-04-2011
Message 1 of 3 (188 Views)

LoadRunner C#.NET Vuser

Hi All,

 

Please help me how to use this function in Visual Studio LoadRunner C#.NET Vuser:

LoadRunner.WebApi web = new LoadRunner.WebApi();

web.url("newtours.demoaut.com", "URL=http://newtours.demoaut.com/");

web.submit_form("login.php", "Name=userName, Value=mercury, ENDITEM," +
                    "Name=password, Value=mercury, ENDITEM", "LAST");

 

I tried multiple times but system is always present incorrect page after submit form

 

Please help,

Thanks so much

Please use plain text.
HP Expert
rleitons
Posts: 141
Registered: ‎07-21-2009
Message 2 of 3 (152 Views)

Re: LoadRunner C#.NET Vuser

Hi Phuong

Could you please add the extended log for this section?. I want to know more information about this issue.

 

Rodolfo Leitón

HP LR/PC Support

If you are customer you can try posting on our internal forums for more personalized support.

 

For LoadRunner here.
For Performance Center here.

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution

Please use plain text.
Occasional Advisor
PhuongNguyen
Posts: 9
Registered: ‎03-04-2011
Message 3 of 3 (146 Views)

Re: LoadRunner C#.NET Vuser

Thanks for your reply,

 

LoadRunner.LrApi lr;
LoadRunner.WebApi web;

string vData = "Name=username, Value=jojo, ENDITEM, Name=password, Value=bean, ENDITEM, LAST";

string strOption = "Resource=0, RecContentType=text/html, Referer=, Snapshot=t1.inf, Mode=HTML, LAST";

web.url("index.htm", "URL=http://127.0.0.1:1080/WebTours/index.htm", strOption);
lr.think_time(10);
web.submit_form("login.pl", "Snapshot=t2.inf", vData);
lr.think_time(5);


And log file

 

Thanks so much,

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation