Check App State

Estimated reading: 3 minutes

The CheckAppState activity verifies whether a specified SAP user interface element appears or disappears within a configured timeout period. It uses the captured element information to monitor the target control and evaluate its state during execution. Based on the configured condition, the activity returns a Boolean result and routes workflow execution through either the Target appears or Target does not appear branch.

Prerequisites

Execute the SAP Logon activity to establish or attach to an SAP session before using CheckAppState to monitor SAP UI elements.

Activity Designer Options

Select Element: Opens the SAP UI spy tool to capture and select the target SAP UI element on the screen.

Wait for: Dropdown menu to select the state condition to check:
Appear: Waits until the specified SAP UI element exists or becomes visible on the screen.
Disappear: Waits until the specified SAP UI element is no longer visible on the screen.

Target appears: Container branch in which you add the activities to execute when the specified condition is satisfied within the configured Wait Time.

Target does not appear: Container branch in which you add the activities to execute when the specified condition is not satisfied within the configured Wait Time.

Properties

Execution

Delay After: Specifies the pause duration (in milliseconds) after the activity completes executing. The default value is 300.

Delay Before: Specifies the pause duration (in milliseconds) before the activity begins executing. The default value is 200.

Use Anchor: Boolean checkbox indicating whether an anchor element should be used to reliably identify the target SAP UI element. Checked (True) by default.

Wait Time: Specifies the maximum duration (in milliseconds) to wait for the selected condition to be satisfied before timing out. The default value is 5000 (5 seconds).

Input

Check: Specifies the condition to evaluate for the target SAP UI element (Appear for Element Exists, or Disappear for Element Disappears).

Misc

DisplayName: The display name of the activity in the workflow designer. The default value is CheckAppState.

SkipOnError: Specifies whether workflow execution continues when the activity encounters an error.
True: Continues workflow execution when an error occurs.
False: Stops workflow execution when an error occurs.
None: Uses the default value, False.

Version: Displays the version number of the SAP Automation activity package being used.

Output

Result: Returns a Boolean value indicating the activity’s execution status.
True: The activity executed successfully.
False: The activity failed due to an unexpected error

How It Works

1. The CheckAppState activity monitors the specified SAP UI element using the captured target information.
2. During execution, the activity searches for the target element within the active SAP session.
3. It evaluates the configured condition based on the selected Check option, such as Appear or Disappear.
4. The activity waits for the configured Wait Time while continuously checking the target element’s state.
5. If the specified condition is met within the timeout period, the activity marks the check as successful and executes the Target appears branch.
6. If the condition is not met before the timeout expires, the activity executes the Target does not appear branch.
7. The result of the check can be stored in the Result output property for use in later workflow steps.

Example

To verify that an SAP confirmation message appears after submitting a transaction:
1. Use Spy to capture the confirmation message element.
2. Set the Check property to Appear.
3. Configure an appropriate Wait Time to allow the message to load.
4. Add the next workflow actions to the Target appears branch and fallback handling to the Target does not appear branch.
During execution, CheckAppState monitors the target message and routes the workflow based on whether the confirmation message appears within the configured timeout period.

Share this Doc

Check App State

Or copy link

CONTENTS
Robility Chatbot
Robility Assistant
Online