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

Urgent: IWebAPI.submit_data error on LR11.52 and LR12

$
0
0

Hi,

 

Please help me solve the issue when I'm using IWebAPI.submit_data

 

On LoadRunner:

 web_url("newtours.demoaut.com",
  "URL=http://newtours.demoaut.com/",
  "TargetFrame=",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=",
  "Snapshot=t1.inf",
  "Mode=HTML",
  LAST);

 web_submit_data("login.php",
  "Action=http://newtours.demoaut.com/login.php",
  "Method=POST",
  "TargetFrame=",
  "RecContentType=text/html",
  "Referer=http://newtours.demoaut.com/mercurysignon.php?osCsid=ccd37fae04df2f2a461a4d21bf92694b",
  "Snapshot=t2.inf",
  "Mode=HTML",
  ITEMDATA,
//  "Name=osCsid", "Value=2fdc2b77675146139ef5989111c39def", ENDITEM,
  "Name=action", "Value=process", ENDITEM,
  "Name=userName", "Value=mercury", ENDITEM,
  "Name=password", "Value=mercury", ENDITEM,
  "Name=login.x", "Value=9", ENDITEM,
  "Name=login.y", "Value=4", ENDITEM,
  LAST);

 

These lines of code run OK on LoadRunner, but when I tried convert it to VB.NET/C#, I got the issue: cannot submit data to correct page. This is a public site of HP, you can debug and execute my test script.

(Notes: Action and Referer properties)

 

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

 

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

lr.think_time(10)

web.submit_data("login.php", "Action=http://newtours.demoaut.com/login.php",

 "Method=POST, TargetFrame=, RecContentType=text/html, "& _

 "Referer=http://newtours.demoaut.com/, Snapshot=t2.inf, Mode=HTML",

 "ITEMDATA, "& _

 "Name=action, Value=process, ENDITEM, "& _

 "Name=userName, Value=mercury, ENDITEM, "& _

 "Name=password, Value=mercury, ENDITEM, "& _

 "Name=login.x, Value=9, ENDITEM, "& _

 "Name=login.y, Value=4, ENDITEM, "& _

 "LAST")

 

Thanks so much,


Viewing all articles
Browse latest Browse all 12134

Trending Articles



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