01-17-2006 05:26 AM
01-17-2006 10:05 AM
Sure, just build an expression to do it. For example from the following step you could use:
Evaluate(Evaluate("RunState.PreviousStep.Button" + str(RunState.PreviousStep.Result.ButtonHit) + "Label"))
The inner Evaluate returns the expression for the button label, which is usually a string constant. The outer Evaluate evaluates that expression, which in the case of a string constant just removes the quotes.
01-19-2006 08:02 AM
03-16-2018 04:27 PM
This expression causes TestStand to crash if the close button on the popup is clicked
03-19-2018 09:18 AM
Hi Sumit,
Can you clarify more of what you are doing in TestStand and what the close button is doing on the popup?
I was not able to recreate what you are seeing. The expression evaluated fine for me in TestStand 2017.
03-29-2018 02:00 PM
Hi Roxana,
I am trying to log the text of the button that was clicked by the user. The button number does not help when I want to know why the user selected that option. Within the pop-up message step, I use the following to evaluate the button text in "Additional Results":
#NoValidation, Evaluate(Evaluate("Step.Button"+Str(Step.Result.ButtonHit)+"Label"))
This evaluation will give an error if the close button on the pop-up window is clicked.
However, I have found the mistake I was making. In the "Button Options" section I select a button for "Cancel Button". If I select "None" here then the close option in the pop-up window is disabled and the user has to select one of the provided buttons.
Thanks
Sumit