Returns the name of the application state function on which the specified application state or test case function is based.
sAppState = GetAppState (sFunctionName)
Variable | Description |
---|---|
sAppState | Name of the application state function on which sFunctionName is based. STRING. |
sFunctionName | Name of the application state or test case function. STRING. |
GetAppState allows you to access your test cases or application states programmatically, as specified by the BASEDON keyword.
The function returns an error if the specified function is not defined or is not a test case or application state function.
[ ] appstate State1() basedon DefaultBaseState [ ] appstate State2() basedon State1 [-] testcase Test1() appstate State2 [ ] [-] main() [ ] //Prints State2 [ ] Print("Appstate of Test1 is: {GetAppState("Test1")}") [ ] //Prints State1 [ ] Print("Appstate of State2 is: {GetAppState("State2")}")