pilot_set_useragent
Set a custom User-Agent string to simulate different browsers or devices, bypass bot detection, or test mobile user agents. Recreates browser context while preserving cookies and state.
Instructions
Set a custom browser User-Agent string, which recreates the browser context to apply the change while preserving cookies and page state. Use when the user wants to simulate a different browser or device, bypass bot detection, test mobile user agents, or debug User-Agent-dependent behavior. Note: this recreates the browser context, which may briefly interrupt in-progress requests.
Parameters:
useragent: The full User-Agent string (e.g., "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15")
Returns: Confirmation with the new User-Agent string.
Errors:
Context recreation warnings: If cookies or state could not be fully preserved during context recreation, a warning is included.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| useragent | Yes | User agent string |