Skip to main content

scroll

Waits for a selector, then scrolls to it on the page or an x,y coordinate in pixels

Example:

mutation Scroll {
goto(url: "https://example.com") {
status
}

scroll(selector: "h1") {
time
}
}
scroll(
selector: String
timeout: Float
visible: Boolean = false
wait: Boolean = true
x: Float
y: Float
): ScrollResponse

Arguments

scroll.selector ● String scalar

The DOM selector of the element on the page you want to scroll to

scroll.timeout ● Float scalar

How long to wait for the element to appear before timing out, overriding any defaults. Default timeout is 30 seconds, or 30000.

scroll.visible ● Boolean scalar

Whether or not to scroll to the element only if it's visible

scroll.wait ● Boolean scalar

Whether or not to wait for the element, then scroll to it

scroll.x ● Float scalar

The X coordinate, in pixels, to scroll to

scroll.y ● Float scalar

The Y coordinate, in pixels, to scroll to

Type

ScrollResponse object

Response returned after having scrolling inside the page