Quantcast
Channel: LoadRunner Practitioners Forum topics
Viewing all articles
Browse latest Browse all 3978

javascript is not working as expected in loadrunner v12.50

$
0
0

Team,

I'm using the below function in action part to test javascript. LR failed to execute 
Action()
{

    web_js_run(
         "Code= var a=1234; var n=a.length; alert(n); ",
          "ResultParam=uri",
    LAST);
     return 0;
}

Output:
 Starting action Action.
Action.c(4): web_js_run started [MsgId: MMSG-26355]
Alert from JS (len=9): undefined
Action.c(4): web_js_run was successful [MsgId: MMSG-26392]
Ending action Action

Answer should 9 but I used to get undefined. 
Could anyone please help on this to resolve the issue. Thanks 

Note: Enabled javaEngine in RUNTIME 

 


Viewing all articles
Browse latest Browse all 3978

Trending Articles



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