- Get the .js file with a web_url call
- Set content type to "text/js"
- Set resource=1
The following gives an example of the method described.
Script
Action()
{
web_reg_save_param("jsText",
"LB=",
"RB=",
LAST );
web_url("Test-Read-JS-File",
"URL=https://test.server.com/scripts/test.js",
"Resource=1",
"RecContentType=text/js",
"Snapshot=t1.inf",
LAST);
return 0;
}
Console Output
Starting action Action.
Action.c(4): Registering web_reg_save_param was successful [MsgId: MMSG-26390]
Action.c(9): Notify: Saving Parameter "jsText = HTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nCache-Control: max-age=2592000\r\nContent-Type: application/x-javascript; charset=utf-8\r\nDate: Mon, 22 Oct 2012 22:39:40 GMT\r\nExpires: Wed, 21 Nov 2012 22:39:40 GMT\r\nLast-Modified: Fri, 19 Oct 2012
...
Action.c(9): web_url("Test-Read-JS-File") was successful, 614175 body bytes, 321 header bytes [MsgId: MMSG-26386]
Ending action Action.
Hello,
ReplyDeleteThe Article on Loadrunner How to Read Parameters From Javascript, gives detailed information about it. Thanks for Sharing about Testing tools For More information check the detail on the LoadRunner Testing here Software Testing Company