ScrollPattern

Supported in UFT Developer version 2023 and later

UIA Pro is supported as a technical preview.

UIAPro. ScrollPattern

new ScrollPattern()

The UIA Pro Scroll pattern.

Methods

canScrollHorizontally() → {Promise.<boolean>}

Indicates whether the UIA Pro element can scroll horizontally.

Returns:

a promise that is fulfilled with an indication of whether the object is horizontally scrollable or not.
Type
Promise.<boolean>

canScrollVertically() → {Promise.<boolean>}

Indicates whether the UIA Pro element can scroll vertically.

Returns:

a promise that is fulfilled with an indication of whether the object is vertically scrollable or not.
Type
Promise.<boolean>

getHorizontalScrollPercent() → {Promise.<number>}

Returns the current horizontal scroll position.

Returns:

a promise that is fulfilled with the object's current horizontal scroll position value.
Type
Promise.<number>

getHorizontalViewSize() → {Promise.<number>}

Returns the current horizontal view size.

Returns:

a promise that is fulfilled with the object's current horizontal view size value.
Type
Promise.<number>

getVerticalScrollPercent() → {Promise.<number>}

Returns the current vertical scroll position.

Returns:

a promise that is fulfilled with the object's current vertical scroll position value.
Type
Promise.<number>

getVerticalViewSize() → {Promise.<number>}

Returns the current vertical view size.

Returns:

a promise that is fulfilled with the object's current vertical view size value.
Type
Promise.<number>

scroll(horizontalAmount, verticalAmount) → {Promise.<void>}

Scrolls the view according to the values provided in the parameters.

Parameters:

NameTypeDescription
horizontalAmountScrollAmountthe horizontal scroll amount.
verticalAmountScrollAmountthe vertical scroll amount.

Returns:

a promise that is fulfilled.
Type
Promise.<void>

scrollHorizontal(horizontalAmount) → {Promise.<void>}

Scrolls the view horizontally according to the value provided in the parameter.

Parameters:

NameTypeDescription
horizontalAmountScrollAmountthe horizontal scroll amount.

Returns:

a promise that is fulfilled.
Type
Promise.<void>

scrollVertical(verticalAmount) → {Promise.<void>}

Scrolls the view vertically according to the value provided in the parameter.

Parameters:

NameTypeDescription
verticalAmountScrollAmountthe vertical scroll amount.

Returns:

a promise that is fulfilled.
Type
Promise.<void>

setHorizontalScrollPercent(horizontalPercent) → {Promise.<void>}

Sets the horizontal scroll percent of the view.

Parameters:

NameTypeDescription
horizontalPercentnumberthe horizontal scroll percent.

Returns:

a promise that is fulfilled.
Type
Promise.<void>

setScrollPercent(horizontalPercent, verticalPercent) → {Promise.<void>}

Sets the scroll percent of the view.

Parameters:

NameTypeDescription
horizontalPercentnumberthe horizontal scroll percent.
verticalPercentnumberthe vertical scroll percent.

Returns:

a promise that is fulfilled.
Type
Promise.<void>

setVerticalScrollPercent(verticalPercent) → {Promise.<void>}

Sets the vertical scroll percent of the view.

Parameters:

NameTypeDescription
verticalPercentnumberthe vertical scroll percent.

Returns:

a promise that is fulfilled.
Type
Promise.<void>