Check Action (TreeViewItem Objects)

Applies to TestComplete 14.74, last modified on March 31, 2021
This method is not supported in web tests (including cross-platform web tests) that use XPath expressions and CSS selectors to locate web elements. This method can be only used in tests that locate web objects by using internal identification properties provided by TestComplete.

Description

Check moves the mouse pointer to the tree view control’s item and then checks or unchecks this item.

Declaration

TestObj.Check(Checked)

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Checked [in]    Required    Boolean    
Result None

Applies To

The method is applied to the following objects:

View Mode

To view this method in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Parameters

The method has the following parameter:

Checked

True if the specified item should be checked, or False if the item should be unchecked.

Result Value

None.

Remarks

If Checked is True and the item is unchecked, it is checked; if Checked is False and the item is checked, it is unchecked. If the item is already in the specified state, no action is performed. If the specified item is not found, Check fails and posts an error message to the test log.

Win32TreeViewItem: The Check action can be applied only to items in those tree view controls that display check boxes (or custom state images) next to items. Such tree views have the TVS_CHECKBOXES style. If the tree view control does not have this style, the Check action fails and posts an error message to the test log.

Example

To view an example that demonstrates how to use the Check action, see Checking and Unchecking Tree View Items.

See Also

Click Action (TreeViewItem Objects)

Highlight search results