Flex Functions (FLEX) > Alphabetical List of Functions > Flex and Flex AMF > flex_login

flex_login

Logs on to a password-protected Flex application.

Example: Flex session Flex AMF Alphabetical Listing
int flex_login( "stepname", "URL=<address>", "Snapshot=<snapshot file>",   ["IsParseResponse=<yes/no>",] "Username=<user name>",  "Password=<password>", ["ResponseParameter={parameter name},] LAST );

This function returns LR_PASS (0) on success or LR_FAIL (1) on failure. Note that LR_PASS and LR_FAIL generally indicate whether the function call completed without an exception, and not that the test step succeeded.

All input string arguments (char type) except the step name can be parameterized using standard parameterization.

Arguments

Name Comments
stepname The name of the step. Stepname is specified without a keyword, for example "Mystep". If you edit the recorded argument, use any string value that is a unique step name in the script.
Snapshot The name of the snapshot file (for example, "Snapshot=t31.inf") is generated automatically. Do not change it. When manually coding a Vuser script function call, do not enter it. When copying an existing function call, delete the Snapshot argument.
IsParseResponse "IsParseResponse=No" prevents parsing the message during the test run. "IsParseResponse=No" is added to the step if parsing fails when script is generated. It can also be added manually to improve performance if parsing is not required. There is usually no need to add "IsParseResponse=Yes" to a step. It can be added to force an attempt when the test is run to parse a message that could not be parsed when the step was recorded.
URL The web address of the target application.
Username The user name.
Password The encrypted password.
ResponseParameter The name of a parameter to store the entire XML-serialized AMF response.
LAST This delimiter marks the end of the argument list.

General Information

The flex_login function logs the Vuser on to the application.