SetPositionXY Action (Specific to YUI 2 Slider Controls)

Applies to TestComplete 15.68, last modified on October 16, 2024
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

The logical position of a two-dimensional slider is specified by the horizontal and vertical offsets. The SetPositionXY action moves the slider to the specified position. The horizontal position must be within the wMinXwMaxX range and the vertical position must be within the wMinYwMaxY range (the bounds are included).

Declaration

TestObj.SetPositionXY(PositionX, PositionY)

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
PositionX [in]    Required    Integer    
PositionY [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:

PositionX

An integer value that specifies the slider's horizontal logical position.

PositionY

An integer value that specifies the slider's vertical logical position.

Result Value

None.

Remarks

To set the position of a one-dimensional slider, use the wPosition property. If the SetPositionXY method is called for a one-dimensional slider, an error occurs.

If the PositionX value is greater than the wMaxX value (or less than the wMinX value), the slider's horizontal position is set to the wMaxX value (or the wMinX value) and an error message is posted to the test log.

If the PositionY value is greater than the wMaxY value (or less than the wMinY value), the slider's horizontal position is set to the wMaxY value (or the wMinY value) and an error message is posted to the test log.

See Also

wMax Property (TrackBar and Slider Controls)
wMin Property (TrackBar and Slider Controls)
wPosition Property (TrackBar and Slider Controls)

Highlight search results