butterbee/commands/input

Input commands

The input commands module contains commands found in the input section of the webdriver bidi protocol. Butterbee uses these internally to create the high level API. But you can use these commands directly if you want something specific.

Values

pub fn perform_actions(
  socket: @internal WebDriverSocket,
  params: perform_actions.PerformActionsParameters,
) -> #(
  @internal WebDriverSocket,
  Result(definition.CommandResponse, @internal ButterbeeError),
)

The input.performActions command performs a specified sequence of user input actions.

Example

let click_params =
  perform_actions.default(context)
  |> perform_actions.with_actions([
    perform_actions.with_pointer_actions("mouse action", [
      perform_actions.pointer_down_action(mouse_button_to_int(key.LeftClick)),
      perform_actions.pointer_up_action(mouse_button_to_int(key.LeftClick)),
    ]),
  ])

w3c

Search Document