Key actions to be passed into actions_stream()
. actions_press()
represents pressing a key on the keyboard, while actions_release()
represents releasing a key.
Arguments
- key
The key to press: a string consisting of a single character. Use the keys object to use special keys (e.g.
Ctrl
).
Examples
actions_stream(
actions_press("a"),
actions_release("a"),
actions_press(keys$enter),
actions_release(keys$enter)
)
#> [[1]]
#> [[1]]$type
#> [1] "key"
#>
#> [[1]]$id
#> [1] "600761"
#>
#> [[1]]$actions
#> [[1]]$actions[[1]]
#> $type
#> [1] "keyDown"
#>
#> $value
#> [1] "a"
#>
#> attr(,"class")
#> [1] "selenium_action" "selenium_action_key" "selenium_action_press"
#>
#> [[1]]$actions[[2]]
#> $type
#> [1] "keyUp"
#>
#> $value
#> [1] "a"
#>
#> attr(,"class")
#> [1] "selenium_action" "selenium_action_key"
#> [3] "selenium_action_release"
#>
#> [[1]]$actions[[3]]
#> $type
#> [1] "keyDown"
#>
#> $value
#> [1] ""
#>
#> attr(,"class")
#> [1] "selenium_action" "selenium_action_key" "selenium_action_press"
#>
#> [[1]]$actions[[4]]
#> $type
#> [1] "keyUp"
#>
#> $value
#> [1] ""
#>
#> attr(,"class")
#> [1] "selenium_action" "selenium_action_key"
#> [3] "selenium_action_release"
#>
#>
#>
#> attr(,"class")
#> [1] "selenium_actions_stream"