webpage_set_cookie
Set a cookie on the CURRENT page origin in the device browser (iOS Safari or Android Chrome, auto-detected), via document.cookie. Use to seed auth/session state before a flow. LIMITATION: sets a NON-HttpOnly cookie on the current document origin only (cannot set HttpOnly/Secure-only or cross-domain cookies — that needs the browser CDP Network domain, which the iOS bridge does not expose). Defaults path=/ and a 365-day expiry. Returns { set, name, cookie }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Expiry in days from now (default 365; 0 = session) | |
| name | Yes | Cookie name | |
| path | No | Cookie path (default: /) | |
| udid | Yes | Device UDID / serial (iOS or Android) | |
| value | Yes | Cookie value | |
| pageId | No | Target page/tab id — auto-picked when omitted | |
| socket | No | Android only: abstract unix socket name (default: chrome_devtools_remote) | |
| platformVersion | No | Ignored (kept for compatibility) |