Share this page

# lr.get_scenario_id

Returns the id of the current scenario or session step.

## Java Language

    int lr.get_scenario_id ( );

Example: lr.get_scenario_id | Informational Functions

The lr.get_scenario_id function returns the id of the current scenario or session step.

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 the id of the current Scenario or Session step. If no ID number is available (for example, there is no active Scenario or Session step) it returns -1. The return value is a pointer to static data and should only be read, not altered.

## Parameterization

Parameterization is not applicable to this function.

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: