Skip to Content

Commands

Commands are Playwright-like browser instructions sent from the worker to the client.

How commands work

Commands are relayed one at a time through the session:

  1. Worker sends worker.command
  2. Session actor relays as server.command to the client
  3. Client executes the command in the webview
  4. Client sends client.command_response
  5. Session actor relays as server.command_result to the worker

Command types

Commands mirror Playwright’s browser automation API:

  • navigate — Navigate to a URL
  • click — Click an element by selector
  • fill — Fill an input field
  • select — Select a dropdown option
  • wait — Wait for a selector or condition
  • evaluate — Execute JavaScript in the page context

One at a time

Only one command can be pending at a time. The worker must wait for the result before sending the next command.

Next steps

Last updated on