Scroll actions to be passed into actions_stream()
. Scroll the page in
a given direction.
Arguments
- x
The x coordinate from which the scroll action originates from.
- y
The y coordinate from which the scroll action originates from.
- delta_x
The number of pixels to scroll in the x direction.
- delta_y
The number of pixels to scroll in the y direction.
- duration
The duration of the scroll, in seconds.
- origin
The point from which
x
andy
are measured. Can be aWebElement
object, in which casex
andy
are measured from the center of the element. Otherwise,origin
must be"viewport"
.
Examples
actions_stream(
actions_scroll(x = 1, y = 1, delta_x = 1, delta_y = 1, duration = 0.5)
)
#> [[1]]
#> [[1]]$type
#> [1] "wheel"
#>
#> [[1]]$id
#> [1] "157208"
#>
#> [[1]]$actions
#> [[1]]$actions[[1]]
#> $type
#> [1] "scroll"
#>
#> $x
#> [1] 1
#>
#> $y
#> [1] 1
#>
#> $duration
#> [1] 500
#>
#> $origin
#> [1] "viewport"
#>
#> $deltaX
#> [1] 1
#>
#> $deltaY
#> [1] 1
#>
#> attr(,"class")
#> [1] "selenium_action" "selenium_action_scroll"
#>
#>
#>
#> attr(,"class")
#> [1] "selenium_actions_stream"