Focus Window

This activity allows you to set focus to an already open application window brining the window to forefront. You must use this activity before any other activity that requires the window to be in focus to perform the configured action. This activity is especially used with image or surface automation.

Following activities require focus to start capturing automation tasks:

·       Print Screen

·       Key Events

·       Image Control

·       Text Extractor

·       Dock Window

Using Focus Window Activity

1.    In the Canvas Tools pane, click Process Components to expand the tool and view the associated activities.

2.    Drag the Focus Window activity and drop on to the Flowchart designer on the  Canvas. The validation error symbol disappears when required inputs are provided.

 

 

3.    In the Window Title field, enter the title of the window that you want to bring in focus and select the check box to set it as the default value of the title. Alternatively, In the Window Title list, select a parameter that holds the title you want to display. You must define the parameter in the Parameter bar use this option.

4.    In the Equals list, select the criteria to search for the required window in focus. You can select the intended window in focus based on certain criteria:

·       StartsWith- selects the window based on the starting text of the window name

·       Equals- selects the window based on the exact match with the window name

·       EndsWith- selects the window based on the text with which the window name ends

·       Contains- selects the window based on the text present in the window name

·       Regex- selects the window with the name matching the search pattern defined through the provided regular expression such as a.b, *txt and others.

5.    In the Maximized list, select the size of the window when in focus. Available options are:

·       Maximized- displays the window with its maximum size

·       Normal- displays the window with the standard size of a window

The Focus Window activity with a default display name is created.

See Example of Print Screen activity and Example of Key Events activity where the Focus Window activity is used.

Focus Window Properties

The properties of a Focus Window activity are listed in the following table and can be edited in the Properties grid on the right panel.


Property Name

Usage

Control Execution

Ignore Error

When this option is set to Yes, the application ignores any error while executing the activity.

If set to NA, it bypasses the exception (if any) to let the automation flow continue; however, it marks the automation status as failure, in case of an exception.

By default, this option is set to No.

Delay

Wait After

Specify the time delay that must occur after the activity is executed. The value must be in milliseconds.

Wait Before

Specify the time delay that must occur before the activity is executed. The value must be in milliseconds.

Misc

Breakpoint

Select this option to mark this activity as the pause point while debugging the process. At this point, the process freezes during execution allowing you to examine if the process is functioning as expected.

In large or complex processes, breakpoints help in identifying the error, if any.

Commented

Select this option to mark this activity as inactive in the entire process. When an activity is commented, it is ignored during the process execution.

DisplayName

The display name of the activity in the flowchart designer. By default, the name is set as Focus Window. You can change the name as required.

On This Page Hide