Scrolls and Swipes

Scrolls and Swipes

testRigor supports scrolling and swiping in all 4 directions: up, down, left right

You can also scroll partially (½, ¼, up to an eighth) for better accuracy and speed of execution:
scroll up by 1/4 of the screen
Or start scrolling from a specific part of the page:
scroll up on “Contact Us”

Swipe is the same as a scroll, but only for mobile browsers and mobile apps. Important! Swipe up/down is in the opposite direction of the scroll. Swipe up = scroll down

Scrolling in a loop

Loops are just another to talk about repetitive or reiterative actions. the most common way this is applied in scrolling is when users need to scroll directly to a specific part of the page using the keyword until:
scroll up until page contains “Place order”
The above command will scroll up to 10 times; however, users can define loops to occur between 2 and 42 times with the words up to.
scroll down up to 30 times until page contains “Place order”

Note: The scroll until page contains method works best in Visible first mode. Visible first prioritizes only what is visible in the viewport/screenshot. Batched mode opens testRigor’s visibility to anything that is loaded on the page whether it is visible to the end user or not. (To toggle this setting, you can find the dropdown in Settings -> Speed optimizations -> Performance -> Getting visibility of elements approach)

Scrolling on a screen location

Screen location can be put in two different categories: scrolling inside scrollable containers and scrolling on a specific element.

Scrolling inside scrollable containers

When the screen has several scrollable areas and we need to scroll inside of it without moving the page itself, we target the container/div with the content we need to move into view and perform the scroll.

scroll down on "myDiv" until "element" is visible

Scrolling on a specific element

When the screen has several compartments and we need to scroll on an area without being confined to a container/div, we can target something on the screen and scroll on a loop using the mouse.

scroll down on "element1" up to 10 times until "element2" is visible using the mouse

Note: Notice that when scrolling using the mouse, a limit must be set for the loop.

Scrolling using the mouse

Scrolls are usually handled by a javascript event. Using the mouse forces testRigor to use the actual mouse wheel the same way that clicking using the mouse forces us to use the mouse button.

scroll down on "text" until page contains "Sign here!" using the mouse
scroll down on "text" using the mouse until page contains "Sign here!"

Automatic Scrolling

testRigor uses a logic that automatically scroll targeted elements to the center of the screen. This applies to elements targeted in click or hover commands, input fields targeted in enter commands, elements targeted in validations, and anchors used to refer to any other element. When used, anchors have the highest priority for automatic scrolling.

It is possible to change auto-scrolling settings in Settings ->Speed optimizations if you want make a permanent change.

If you want to keep auto-scrolling enabled, you can also address individual issues by adding the key phrase without scrolling to the end of the command.

Screenshot behavior for scrolling

Like click, drag and hover commands, each scroll command prompts a new screenshot.

Auto-scrolling, however, has a far more important impact on screenshots. It does not prompt screenshots, but it is especially important when several commands that do not prompt a new screenshot are used consecutively. For example, enter commands and validations do not prompt screenshots, but they do trigger auto-scrolling. That means if there are several of either before a click, drag, hover or scroll, testRigor will automatically scroll eligible elements to the middle of the screen upon executing each command. This can result in screenshots where validation highlights either do not appear or appear to be in the wrong place (e.g., when a validation occurs at the top of the screen and an enter command occurs in a field at the bottom of the page).

Test your knowledge

scroll up until visible “Place order”
scroll up until page contains “Place order”
scroll up until “Place order” is on top
scroll up until “Place order” is loaded
Batched mode
Scrolling first mode
Visible first mode
Mouse wheel mode