scrollRootElement method

Class: CheckSettingsPlatform: NightwatchLanguage: 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:Element
This object is the element to be scrolled.

Type definitions

Element
Used to identify an HTML element defined as |{ELEMENT:string}|{'element-6066-11e4-a52e-4f735466cecf':string}|import('nightwatch').NightwatchTypedCallbackResult.
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 |{locateStrategy:import('nightwatch').LocateStrategy;selector:'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.