TouchNextTo Action

Applies to TestComplete 15.46, last modified on January 09, 2023

Description

Use the TouchNextTo action to simulate a touch on the mobile 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.TouchNextTo(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 TouchNextTo action, see Get Controls With No Text Contents.

See Also

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

Highlight search results