PlaywrightEx.Supervisor (PlaywrightEx v0.4.0)

Copy Markdown View Source

Playwright connection supervision tree.

Supports two transport modes:

  • Local Port (default): Spawns Node.js playwright driver
  • WebSocket: Connects to remote Playwright server

Options

  • :ws_endpoint - WebSocket URL (e.g. ws://localhost:3000?browser=chromium). If provided, uses WebSocket transport. Otherwise uses local Port. If no browser param is provided, chromium is used by default.
  • :executable - Path to playwright CLI (only for Port transport)
  • :timeout - Connection timeout
  • :js_logger - Module for logging JS console messages
  • :name - Optional name for this supervisor instance. Defaults to PlaywrightEx.Supervisor. Use this to run multiple independent Playwright connections (e.g., one with PortTransport, another with WebSocketTransport). The name is used to derive child process names.

Limitations of WebSocket connection to remote server

Summary

Functions

Returns a specification to start this module under a supervisor.

Returns the connection process name for a given supervisor name.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

connection_name(supervisor_name \\ __MODULE__)

Returns the connection process name for a given supervisor name.

start_link(opts \\ [])