Skip to main content

scrollIntoView

Scroll element into viewport (MDN Reference).

Usage
$(selector).scrollIntoView(scrollIntoViewOptions)
Parameters
NameTypeDetails
scrollIntoViewOptions
optional
object, booleanoptions for Element.scrollIntoView() (default: true)
Example
scrollIntoView.js
it('should demonstrate the scrollIntoView command', async () => {
const elem = await $('#myElement');
// scroll to specific element
await elem.scrollIntoView();
});