ClickNextTo Action

Applies to TestComplete 15.70, last modified on December 17, 2024

Description

Use the ClickNextTo action to simulate a click of the left mouse button on the screen area that is at the specified distance and in the specified position relative to the text block recognized by the optical character recognition (OCR) engine.

Declaration

TestObj.ClickNextTo(Direction, Offset)

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

Applies To

The method is applied to the following object:

View Mode

This method is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.

Parameters

The method has the following parameters:

Direction

Specifies the position of the target screen area, which is relative to the recognized text block. The allowed parameter values are:

Value Description
toLeft The target screen area is located to the left of the text block.
toTop The target screen area is located above the text block.
toRight The target screen area is located to the right of the text block.
toBottom The target screen area is located below the text block.

Offset

Specifies the distance between the point at which you want to simulate user actions and the text block’s border that is closest to the point. For instance, if the target point is located to the right of the text block, the Offset parameter specifies the distance between the block’s left border and the point.

Result Value

None.

Example

To view an example that demonstrates how to use the ClickNextTo action, see Get Controls With No Text Contents.

See Also

Get Controls With No Text Contents
OCRTextBlock Object Methods
OCRTextBlock Object
Optical Character Recognition
TouchNextTo Action

Highlight search results