setScrollRootElement method

Class: ConfigurationPlatform: NightwatchLanguage: JavaScript SDK:

Use this method to set the element to which setHideScrollbars will be applied.

Syntax

let configval = config.setScrollRootElement(scrollRootElement_ele);

let configval = config.setScrollRootElement(scrollRootElement_sel);
config.scrollRootElement = configval;
configval = config.scrollRootElement;

Note that this feature is available as both a method and a property.

Parameters

scrollRootElement_ele
Type:Element

The element that should be scrolled.

An element whose position and bounding rectangle defines the region.

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

The element that should be scrolled.

A selector to an element whose position and bounding rectangle defines the region.

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: Configuration