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:
Name | Type | Description |
---|---|---|
horizontalAmount |
ScrollAmount | the horizontal scroll amount. |
verticalAmount |
ScrollAmount | the 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:
Name | Type | Description |
---|---|---|
horizontalAmount |
ScrollAmount | the 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:
Name | Type | Description |
---|---|---|
verticalAmount |
ScrollAmount | the 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:
Name | Type | Description |
---|---|---|
horizontalPercent |
number | the 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:
Name | Type | Description |
---|---|---|
horizontalPercent |
number | the horizontal scroll percent. |
verticalPercent |
number | the 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:
Name | Type | Description |
---|---|---|
verticalPercent |
number | the vertical scroll percent. |
Returns:
a promise that is fulfilled.
- Type
- Promise.<void>