Jump to content


Issue with capturing values of a form

  • Please log in to reply
1 reply to this topic

#1 hjanweja



  • Members
  • Pip
  • 8 posts

Posted 04 December 2013 - 10:53 PM

Hi Xperts,

I would like to create a variable so that I can capture a particular value from the form. The value that I want to capture is not a part of the URL parameter list.
Here is the Javascript I have written -

function getPersonID()
var dgReport = document.getElementById("dgReport");
var QS = dgReport.rows[1].cells[1].innerHTML;
return QS.split("&")[0];

How can I ensure that this JS gets executed when the form is being displayed and how can I use the return value of this JS after 20 steps? I would like to return its value into a variable which I can use later in the script. I created the Javascript function (right click on step) and it created a JS as a substep of the form. I even saved this JS on my desktop and added it to the javascript library. Any variable I create within the script does not show up in the list of global variables so I cant resuse it.

Any help would be appreciated. Thanks !

#2 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 665 posts

Posted 05 December 2013 - 06:13 AM

You can use the $Search function.
Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users