LoadRunner C#.NET Vuser (343 Views)
Occasional Advisor
Posts: 9
Registered: ‎03-04-2011
Message 1 of 3 (343 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

HP Expert
Posts: 150
Registered: ‎07-21-2009
Message 2 of 3 (307 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

Occasional Advisor
Posts: 9
Registered: ‎03-04-2011
Message 3 of 3 (301 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=", strOption);
web.submit_form("login.pl", "Snapshot=t2.inf", vData);

And log file


Thanks so much,

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.