lr.whoami
Returns information about the Vuser executing the script.
Example | Informational Functions |
Syntax
lr.whoami ( vuserID );
Arguments
Argument | Comments |
---|---|
vuserID | The Vuser id number. |
The lr.whoami function gets information about the Vuser.
To access the scenario ID, add the scenario attribute to the runtime settings. Add scenario to the Additional Attributes on the General tab. If the scenario attribute is not added to the runtime settings, the scenario ID is always zero (0).
Return Values
Returns a JavaScript array containing the Vuser ID, the Vuser group, and the scid. The scid is the Scenario or Session step ID number.Parameterization
You cannot use standard parameterization for any arguments in this function.
Example
result = lr.whoami(); lr.message(" vuser id: " + result[0]+ " scenario id: "+ result[1] + " Group: " + result[2]); // vuser id: -1 scenario id: 0 Group: undefined