DisplayMessage Method

Class

AgentClass class.

Action

Displays a message box and halts script execution until the user manually dismisses the message box.

Syntax

Agent.DisplayMessage (sTitle, sMessage)
Variable Description
sTitle The text for the message box caption. STRING.
sMessage The text for the contents of the message box. STRING.

Notes

DisplayMessage displays a message box with the specified caption and message, along with OK and Cancel pushbuttons. Script execution pauses until one of the pushbuttons is manually pushed. If the user pushes OK, execution resumes. Pressing Cancel is equivalent to aborting script execution.

DisplayMessage is useful for stopping a test during a demonstration, or prompting the user to perform manual verification. It is not recommended for unattended testing.

Pushbuttons cannot be clicked by a script that contains the call to DisplayMessage; they must be clicked manually by the user.

Example

Halt ()
STRING sTitle = "Verification Message" 
STRING sMessage =  "Press OK to continue, or Cancel to halt execution." 
Agent.DisplayMessage (sTitle, sMessage)