Class GuiMessageWindow
Wraps a SAP GUI modal message / popup dialog (GuiMessageWindow). These appear when SAP shows a system message that requires user confirmation, e.g. "Document saved", "Are you sure?", error dialogs.
public class GuiMessageWindow : GuiComponent
- Inheritance
-
GuiMessageWindow
- Inherited Members
Properties
IsError
Returns true if the message type is Error (E) or Abort (A).
public bool IsError { get; }
Property Value
IsInfo
Returns true if the message type is Information (I).
public bool IsInfo { get; }
Property Value
IsSuccess
Returns true if the message type is Success (S).
public bool IsSuccess { get; }
Property Value
IsWarning
Returns true if the message type is Warning (W).
public bool IsWarning { get; }
Property Value
MessageType
Message type: "S"=Success, "W"=Warning, "E"=Error, "A"=Abort, "I"=Info.
public string MessageType { get; }
Property Value
Text
The message body text displayed inside the popup.
Reads SAP's inner text fields (usr/txtMESSTXT1 … usr/txtMESSTXT4)
and joins non-empty lines with a space.
Falls back to the window title text if no inner fields are found
(e.g. when the popup is a GuiModalWindow without standard message fields).
public override string Text { get; }
Property Value
Title
Title bar text of the popup window.
public string Title { get; }
Property Value
Methods
ClickButton(string)
Clicks the first button whose text contains textFragment
(case-insensitive). Useful for "Yes" / "No" / "OK" / "Cancel" buttons.
public void ClickButton(string textFragment)
Parameters
textFragmentstring
ClickCancel()
Clicks "Cancel" / "No" (VKey 12).
public void ClickCancel()
ClickOk()
Clicks the "OK" / "Continue" / "Enter" button (VKey 0). Use this to confirm or dismiss most message popups.
public void ClickOk()
GetButtons()
Returns typed GuiButton wrappers for all buttons in the popup. Useful when the popup has non-standard buttons (Yes/No, etc.).
public IReadOnlyList<GuiButton> GetButtons()
Returns
SendVKey(int)
Sends an arbitrary virtual key to the popup window.
public void SendVKey(int vKey)
Parameters
vKeyint
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.