control_url and a WebSocket client. The frames
are the same for a browser, a phone and a computer; the examples below drive a
browser. On a phone, send Touch.tap or Locator.tap where they send
Locator.click; on a computer, Pointer.click with "space": "screen".
Open the socket
The Each session takes one unnamed connection; a new one replaces the old. Add
control_url looks like this, with a short-lived token for that one session:&client=<name> (lowercase, up to 32 characters) to open a named connection
beside it instead. HTTP 401 on connect means the token is bad; 403 means the
session is no longer active.Handshake
protocolVersion and capabilities, the exact methods
this session answers. Check it before relying on a method.A complete client
Ids when several clients share a session
Every connection on a session shares one reply stream, so two clients that both number from 1 can take each other’s replies. Start each connection’s ids at a random base (the Python driver picks one below 252) and match replies byid.
Notifications
Frames without anid are notifications. The only ones sent today are the
opt-in resume notifications; ignore any you don’t
recognise.