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:
- Worker sends
worker.command - Session actor relays as
server.commandto the client - Client executes the command in the webview
- Client sends
client.command_response - Session actor relays as
server.command_resultto 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
- Yield to User — Hand control to the user
- Protocol: Commands — Wire format details
Last updated on