LoadRunner Practitioners Forum

LoadRunner C#.NET Vuser

Trusted Contributor.

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

Micro Focus Expert

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

Trusted Contributor.

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,