An automation client attached to a running Plushie app.
The script layer does not start apps itself. Start the app with
Plushie.start_link/2 or a mix task, then attach to the running instance
or runtime process and drive it through the real runtime and bridge.
Summary
Functions
Attaches to a running Plushie app.
Moves on a canvas. Options: window: for multi-window apps.
Presses on a canvas. Options: window: for multi-window apps.
Releases on a canvas. Options: window: for multi-window apps.
Clicks a widget. Options: window: for multi-window apps.
Cycles focus in a pane grid. Options: window: for multi-window apps.
Pastes text into a widget. Options: window: for multi-window apps.
Scrolls a scrollable widget. Options: window: for multi-window apps.
Selects a value from a pick list, combo box, or radio group.
Options: window: for multi-window apps.
Slides a slider to the given value. Options: window: for multi-window apps.
Sorts a table column. Options: window: for multi-window apps.
Submits a text input. Options: window: for multi-window apps.
Toggles a checkbox or toggler. Options: window: for multi-window apps.
Types text into a text input or editor. Options: window: for multi-window apps.
Types
@type bridge_ref() :: GenServer.server() | nil
@type runtime_ref() :: GenServer.server()
@type selector() :: String.t() | {:text, String.t()} | {:role, String.t()} | {:label, String.t()} | :focused
Automation selector.
String selectors follow these rules:
"#save"matches a unique local widget ID"#form/save"matches an exact scoped ID{:text, "Save"}matches visible text content
@type t() :: %Plushie.Automation.Session{bridge: bridge_ref(), runtime: runtime_ref()}
Functions
Attaches to a running Plushie app.
Accepted options:
:instance-- Plushie instance name; resolves runtime and bridge automatically:runtime-- runtime pid or registered name:bridge-- bridge pid or registered name
@spec await_async(session :: t(), tag :: atom(), timeout :: non_neg_integer()) :: :ok
@spec canvas_move( session :: t(), selector :: selector(), x :: number(), y :: number(), opts :: keyword() ) :: :ok
Moves on a canvas. Options: window: for multi-window apps.
@spec canvas_press( session :: t(), selector :: selector(), x :: number(), y :: number(), button :: String.t(), opts :: keyword() ) :: :ok
Presses on a canvas. Options: window: for multi-window apps.
@spec canvas_release( session :: t(), selector :: selector(), x :: number(), y :: number(), button :: String.t(), opts :: keyword() ) :: :ok
Releases on a canvas. Options: window: for multi-window apps.
Clicks a widget. Options: window: for multi-window apps.
@spec find(session :: t(), selector :: selector()) :: Plushie.Automation.Element.t() | nil
@spec find!(session :: t(), selector :: selector()) :: Plushie.Automation.Element.t()
@spec get_diagnostics(session :: t()) :: [Plushie.Event.SystemEvent.t()]
Cycles focus in a pane grid. Options: window: for multi-window apps.
Pastes text into a widget. Options: window: for multi-window apps.
@spec register_effect_stub( session :: t(), kind :: Plushie.Effect.kind(), response :: term() ) :: :ok
@spec screenshot(session :: t(), name :: String.t(), opts :: keyword()) :: Plushie.Automation.Screenshot.t()
@spec scroll( session :: t(), selector :: selector(), delta_x :: number(), delta_y :: number(), opts :: keyword() ) :: :ok
Scrolls a scrollable widget. Options: window: for multi-window apps.
Selects a value from a pick list, combo box, or radio group.
Options: window: for multi-window apps.
Slides a slider to the given value. Options: window: for multi-window apps.
@spec sort( session :: t(), selector :: selector(), column :: String.t(), direction :: String.t(), opts :: keyword() ) :: :ok
Sorts a table column. Options: window: for multi-window apps.
Submits a text input. Options: window: for multi-window apps.
@spec toggle( session :: t(), selector :: selector(), value :: boolean() | nil, opts :: keyword() ) :: :ok
Toggles a checkbox or toggler. Options: window: for multi-window apps.
@spec type_text( session :: t(), selector :: selector(), text :: String.t(), opts :: keyword() ) :: :ok
Types text into a text input or editor. Options: window: for multi-window apps.
@spec unregister_effect_stub(session :: t(), kind :: Plushie.Effect.kind()) :: :ok