Skip to contents

actions_stream() creates a set of actions to be performed by SeleniumSession$perform_actions(). Actions are a low level way to interact with a page.

Usage

actions_stream(...)

Arguments

...

selenium_action objects: the actions to perform.

Value

A selenium_actions_stream object, ready to be passed into SeleniumSession$perform_actions().

See also

Examples

actions_stream(
  actions_press(keys$enter),
  actions_pause(0.5),
  actions_release(keys$enter),
  actions_scroll(x = 1, y = 1, delta_x = 1, delta_y = 1, duration = 0.5),
  actions_mousemove(x = 1, y = 1, duration = 1, origin = "pointer")
)
#> [[1]]
#> [[1]]$type
#> [1] "key"
#> 
#> [[1]]$id
#> [1] "7399"
#> 
#> [[1]]$actions
#> [[1]]$actions[[1]]
#> $type
#> [1] "keyDown"
#> 
#> $value
#> [1] ""
#> 
#> attr(,"class")
#> [1] "selenium_action"       "selenium_action_key"   "selenium_action_press"
#> 
#> [[1]]$actions[[2]]
#> $type
#> [1] "pause"
#> 
#> $duration
#> [1] 500
#> 
#> attr(,"class")
#> [1] "selenium_action"       "selenium_action_pause"
#> 
#> [[1]]$actions[[3]]
#> $type
#> [1] "keyUp"
#> 
#> $value
#> [1] ""
#> 
#> attr(,"class")
#> [1] "selenium_action"         "selenium_action_key"    
#> [3] "selenium_action_release"
#> 
#> 
#> 
#> [[2]]
#> [[2]]$type
#> [1] "wheel"
#> 
#> [[2]]$id
#> [1] "466393"
#> 
#> [[2]]$actions
#> [[2]]$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"
#> 
#> 
#> 
#> [[3]]
#> [[3]]$type
#> [1] "pointer"
#> 
#> [[3]]$id
#> [1] "497777"
#> 
#> [[3]]$actions
#> [[3]]$actions[[1]]
#> $type
#> [1] "pointerMove"
#> 
#> $x
#> [1] 1
#> 
#> $y
#> [1] 1
#> 
#> $duration
#> [1] 1000
#> 
#> $origin
#> [1] "pointer"
#> 
#> attr(,"class")
#> [1] "selenium_action"              "selenium_action_pointer"     
#> [3] "selenium_action_pointer_move"
#> 
#> 
#> 
#> attr(,"class")
#> [1] "selenium_actions_stream"