MessageBoxClass is the class for any message box that pops up to confirm an action or specify an error. MessageBoxClass is automatically declared when you record the declaration of an application’s main window.
Silk Test Classic designates a window as a message box only if it has no controls of any other types than static text, pushbuttons, or icons.
If you have an explicit declaration for a specific message box, Silk Test Classic uses it instead of the generic message box declaration.
The identifier for the MessageBoxClass is MessageBox.
To call a method on a message box, refer to it as you would any other window in your application. For example:
MessageBox.OK.Click ()
By default, MessageBoxClass has the following children:
Child | Description |
---|---|
OK | OK pushbutton |
Cancel | Cancel pushbutton |
Yes | Yes pushbutton |
No | No pushbutton |
Message | Static text with the message in the message box |
If you need to define other buttons or objects for message boxes in your application, modify the declaration of the message box in the declarations file.