Message Manifest implementation
You need to consider and recognize two elements when implementing Message Manifest in a robotic solution:
- Message Manifest methods
Using the methods of the MessageManifest component, you can retrieve or show defined messages. For example, you add a message definition that has
code 005, which informs users that a login attempt failed. You then include logic in your automation that retrieves the message based on its code and displays it to users when the application fails the login process.
The MessageDetails object contains information about a message definition and its component elements. You use it as an input parameter for certain methods, and it is returned when using other methods.
Message Manifest methods
Four Message Manifest component methods are in the Accelerators section of the Toolbox, as shown in the following figure:
The following table describes the function of each MessagevManifest method:
|GetMessage||Returns the individual properties of the message definition for the specified message code.|
|GetMessageDetails||Returns a MessageDetails object containing the individual properties for a message definition. Input values can be supplied for messages with substitution items.|
|ShowMessage (1 parameter)||Displays message based on MessageDetails object.|
|ShowMessage (2 parameters)||Displays message given its code and any inputs needed for substitution.|
Note: Both ShowMessage methods return a System.Windows.Forms.DialogResult object.
When you use the GetMessageDetails method, it returns a MessageDetails object representing the specified message. The MessageDetails object exposes the message definition as properties.
As a result, an automation can pass the MessageDetails object as an automation output and a Jump label input because both the Jump labels and Exit points support the MessageDetails object as a data type.
Check your knowledge with the following interaction: