Scroll commands
I.scrollBy
Scrolls the page horizontally and vertically by a given number of pixels.
Usage
I.scrollBy(x,y);
Parameters
Parameter | Type | Remarks |
---|---|---|
x | number | Number of pixels to scroll right by. Use a negative number to scroll left instead. |
y | number | Number of pixels to scroll down by. Use a negative number to scroll up instead. |
Example(s)
I.scrollBy(200, -500);
Scrolls the page 200 pixels to the right, and 500 pixels up.
I.scrollUp
Scrolls the page up by a given number of pixels.
Usage
I.scrollUp(y);
Parameters
Parameter | Type | Remarks |
---|---|---|
y | number | Number of pixels to scroll up by. |
Example(s)
I.scrollUp(50);
Scrolls the page 50 pixels up.
I.scrollDown
Scrolls the page down by a given number of pixels.
Usage
I.scrollDown(y);
Parameters
Parameter | Type | Remarks |
---|---|---|
y | number | Number of pixels to scroll down by. |
Example(s)
I.scrollDown(50);
Scrolls the page 50 pixels down.
I.scrollLeft
Scrolls the page left by a given number of pixels.
Usage
I.scrollLeft(x);
Parameters
Parameter | Type | Remarks |
---|---|---|
x | number | Number of pixels to scroll left by. |
Example(s)
I.scrollLeft(50);
Scrolls the page 50 pixels left.
I.scrollRight
Scrolls the page right by a given number of pixels.
Usage
I.scrollRight(x);
Parameters
Parameter | Type | Remarks |
---|---|---|
x | number | Number of pixels to scroll right by. |
Example(s)
I.scrollRight(50);
Scrolls the page 50 pixels right.
I.scrollTo
Scrolls the given coordinate of the page.
If the page is sufficiently tall and wide, the page will be scrolled until the given coordinate is at the top left corner of the screen.
Usage
I.scrollTo(x,y);
Parameters
Parameter | Type | Remarks |
---|---|---|
x | number | x coordinate of the page to scroll to. |
y | number | y coordinate of the page to scroll to |
Example(s)
I.scrollTo(0, 500);
Scrolls to the (0, 500) coordinate of the page.
I.scrollToTop
Scroll to the top of the page.
This is the same as using the command I.scrollTo(0,0)
.
Usage
I.scrollToTop();
I.scrollToBottom
Scroll to the bottom of the page.
For infinite scrolling pages, this command will simply scroll to the end of the rendered content.
Usage
I.scrollToBottom();