TC.getAttr

Returns the value of the command line parameter passed to the test, or its default value.

TC.getAttr(name);

Arguments

name. (string) Name of the command line parameter.

Return value

The command line parameter passed to the test or the default value set for it. If the attribute does not exist, it returns an empty string.

General information

The command line parameter name is generally assigned by the user in the Additional Attributes tab in VuGen > Runtime Settings, or in Controller in the group command line argument.

When the test is run, the additional attribute or the group command line argument is passed to the test, as a parameter in the command line. During a test run, the value can be accessed with this function.

Example

To get the Controller command line argument, -MyServerURL http://myserver.com, call:

Copy code
TC.getAttr(“MyServerURL”);