Scroll operations
Scroll operations allow you to define how Tricentis Tosca should scroll. This enables you to load controls in systems under test that only load controls when you scroll down the page.
If you want to define scrolling behavior for the whole application and not only for specific controls, you can use the Module TBox Scroll Window Operation in the Tricentis Tosca Standard subset. |
To use scroll operations, use the expression {SCROLL} and the following syntax:
Syntax: |
{SCROLL[VerticalAmount][HorizontalAmount][MousePolicy][DirectionPolicy][Delay]} |
Define VerticalAmount
The parameter VerticalAmount defines how far Tosca scrolls along the vertical axis. Specify it in pixels (px) or lines (lines). If you specify a number without a unit of measurement, the page scrolls for the number of mouse wheel notches.
Define HorizontalAmount
The parameter HorizontalAmount defines how far Tosca scrolls along the horizontal axis. Specify it in pixels or lines. If you specify a number without a unit of measurement, the page scrolls for the number of mouse wheel notches.
Define MousePolicy
The parameter MousePolicy defines where Tosca should position the mouse pointer during scrolling. Enter one of the following values:
Value |
Description |
---|---|
Center |
The mouse pointer is positioned in the center of the control. Center is the default value. |
Scrollbar |
The mouse pointer is positioned over the scroll bar. |
None |
The mouse pointer will not be moved. |
Define DirectionPolicy
The parameter DirectionPolicy defines whether Tosca should scroll along the vertical or horizontal axis first. Enter one of the following values:
Value |
Description |
---|---|
VerticalFirst |
Tosca scrolls along the vertical axis first. |
HorizontalFirst |
Tosca scrolls along the horizontal axis first. |
NoDirectionPolicy |
Tosca scrolls along both axes simultaneously. NoDirectionPolicy is the default value. |
Define Delay
The parameter Delay defines the time in milliseconds (ms) that Tosca should wait between scrolling along the vertical and horizontal axis.
Example
In this example, Tosca scrolls the page as follows:
-
3 mouse wheel notches along the vertical axis.
-
100px along the horizontal axis.
-
Mouse pointer is positioned over the scroll bar.
-
Tosca scrolls along the horizontal axis first.
-
Tosca waits 300ms until it scrolls along the vertical axis.
Example of SCROLL operation