The information in this topic may be out of date. The current SDK reference guide has moved here.

scrollRootElement method

Class: CheckSettingsPlatform: Selenium 4Language: JavaScript SDK:

Normally, Eyes will select the most appropriate element to scroll to execute the fully method. You can use the scrollRootElement method to specify the element to scroll explicitly.

Syntax

eyes.check(Target.window().scrollRootElement(scrollRootElement_ele));

eyes.check(Target.window().scrollRootElement(scrollRootElement_sel));

Parameters

scrollRootElement_ele
Type:WebElement
This object is the element to be scrolled.
scrollRootElement_sel
Type:Selector
This object is a selector to the element to be scrolled.

Type definitions

Selector
Used to identify an HTML element defined as |import('selenium-webdriver').Locator|{using:string;value:string}|string|{selector:string;type:string}.

Return value

Type: CheckSettings
The value returned is the object that called the method. You can use it to call other methods supported by the object class.