How Can I Record Which Button Was Pressed in a Message Popup Step in TestStand?

Updated Apr 9, 2019

Reported In

Software

  • TestStand

Issue Details

I want to know which button a user pressed in a message popup step and save this to a local variable

Solution

To do this, go in to the Message Popup step Properties tab:
Go to the Post-Expression box in the Expressions settings:

Enter the following expression:
Locals.<variable name> = Locals. Local.GetNthSubPropertyName("",Step.Result.ButtonHit-1,0)
This will retrieve the name of the button that was pressed (Step.Result.ButtonHit) and save it in the specified local variable as a string.

WAS THIS ARTICLE HELPFUL?

Not Helpful