scroll
Scrolls the page to an element, to an offset (distance) from element or to an offset from the top of the page.
scroll(elemId)
# Or
scroll(elemId, x, y)
# Or
scroll(x, y)
#
ParameterselemId
: Target elementx
: Anumber
. Offset in x axis in pixels, can be negative. Applies only when the page has a horizontal scroll.y
: Anumber
. Offset in y axis in pixels, can be negative.
#
Returns- No value
#
Examplescroll(findElement('Submit', by.text))# scrolls page to the element
scroll(0, 200)# scrolls page to 200px down