CheckAppState

Estimated reading: 3 minutes 3571 views

CheckAppState

This activity helps the user to check the state of a desktop application by verifying the specified element in it. It enables automation processes based on the availability or disappearance of a particular element on the application, enhancing the control and flexibility of your automation workflows.

Properties

INPUT

DelayAfter: It assists the user to add a delay before initiating subsequent activities. The delay duration here is in milliseconds. By default, it is set to “300” milliseconds. When the option is left blank, the delay will not be considered.

DelayBefore: It assists the user in adding a delay before starting the execution of the activities. The delay duration here is in milliseconds. By default, it is set to “200” milliseconds. When the option is left blank, the delay will not be considered.

ExecuteBy:Gets auto filled once the “Active Application” is selected. This contains the set of attributes for the specific spied element. This parameter accepts values in “String” datatype. You can either hardcode the values in “String” format or can enter the values in the “String” datatype.

WaitFor: Indicates to choose the event of the action to be performed.
Element to appear: It will wait for the detected element to appear in the UI on the webpage until the wait time provided.
Element to vanish: It will wait for the detected element to vanish from the UI on the webpage until the wait time provided.

WaitTime: It helps the user to add a delay for activity execution, either to wait for the element to appear or to disappear. The format of the delay here is milliseconds. The property provides 5,10,15,30 milliseconds in the drop-down. You can also provide the time in milliseconds.

MISC

DisplayName: Displays the name of the activity. The activity name can be customized which will help in troubleshooting.

Version: It specifies the version of the web automation feature in use.

Represents mandatory fields to execute the workflow.

Use Case

Let’s start with the example provided in the “Click” activity. (Click here to refer to the activity). In this example, we are automating the “Calculator” application. In the following scenario, I will check whether the application is accessible and available for automation.

 Steps to build the bot

1. Create a new solution or open an existing solution.
2. Install the latest feature of DesktopAutomation from the Manage features.
3. Drag and drop the “CheckAppState” activity to the workflow and set it as start node.
4. Double click on the activity to choose the element.
a. Here I have already launched the Calculator application.
b. Click on the “Select Element” option to detect the application.
c. Navigating to the application and detecting over the application.
d. Now, here I am not considering other attributes and going forward with default selected attributes.

e. Click on “Save” button, the attributes will be auto filled in the properties.
5. Now, select the “WaitFor” property as “Element to appear” since we are verifying the availability of the application. And I am choosing “WaitTime” as “10”. 
6. Now, if the calculator application is on the screen, the bot will continue to perform the next steps provided in the “Click” activity.
7. Next, In the “Target appear” we are adding the “WriteLog” activity to write a message.
a. In the “InputString” , provide the input as “Application is launched successfully!”.
b. Now, choose the log level as “Info” from the drop- down.
8. Here, in the “Target does not appear” area, I am adding the same “Writelog” activity to write the failure message. 
9. Now, save and execute the workflow.  

Share this Doc

CheckAppState

Or copy link

CONTENTS