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

TC: global JavaScript var support?

$
0
0

In other LR protocols I have created simple shared/global variables in the init() module, before/outside of the init() function. Then those vars can be use in the Action action (and all other custom actions I create).

But when I try to do this in a TC script in the Init action, as in:

TC.log.jpg

these JavaScript vars are only visible in the Init action and can't be used in the Action action. I suspect that they above statements are implicitly being encapsuated in the Init() function. I tried playing around with Function Libraries but found no way to add variables outside of a function in a created library.

So is there anyway to share globalJavaScript variables between actions? Or must I only use TC parameters to share strings and numbers between actions (which is so cumbersome)?

? Thanks, Terry

 


Viewing all articles
Browse latest Browse all 3978

Trending Articles



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