> [!IMPORTANT]
> Hard Dependency Warning:
> This skill is strictly dependent on the patchright-mcp server. It will not work unless the patchright-mcp server is correctly installed, configured, and running in the OpenClaw environment.
>
> Repository Access:
> The patchright-mcp server repository is private. Accessing, cloning, and managing the server requires proper authentication credentials and repository privileges.
This skill enables the OpenClaw agent to automate browser interactions stealthily on websites protected by active anti-bot systems (e.g., Cloudflare, Akamai, Datadome). It runs over the patchright-mcp server, which uses a patched Chromium browser.
The browser capabilities are consolidated into four core tools:
patchright_navigation: Manages page lifecycle, navigation, HTML content retrieval, and screenshot captures.patchright_interaction: Executes clicks, text typing, option selections, scrolling, global keys, and elements synchronization.patchright_session: Handles reading, writing, and clearing context cookies, as well as named profiles.patchright_execution: Evaluates page scripts and extracts structured interactive element snapshots.patchright_navigation with action navigate and the target url.patchright_navigation with action close to safely release the browser process and memory.patchright_execution with action snapshot. This extracts all visible interactive elements (buttons, links, inputs) along with their CSS selectors.patchright_interaction.fill repeatedly. Instead, use patchright_interaction with action bulk_fill and pass the list of fields in the items array. This reduces roundtrips and handles fallback evaluations automatically.patchright_interaction with action wait_for targeting the element's selector and expected state (visible, hidden, attached, or detached).patchright_navigation with action screenshot after major actions (like form submissions or clicks) to verify the visual state of the page.patchright_session with action get_cookies to save authentication state, and set_cookies to restore sessions without needing to re-login.pageIndex parameter (zero-based index) available in navigation, interaction, and execution tools.patchright_navigation (action list_pages) and select the target tab using pageIndex instead of performing profile switches.recordVideo: true flag in the open or navigate actions. ~/videos.patchright_navigation with action close_page to finalize the video for a specific tab, or call list_videos to retrieve the paths of recorded files.proxyServer, proxyBypass, proxyUsername, proxyPassword) inside the open, navigate, or create_profile actions to route traffic.proxyServer parameter in subsequent calls; the server will automatically recreate the context with the new proxy.open action without proxy parameters.headless, userAgent, viewport (e.g. { "width": 800, "height": 600 }), and deviceScaleFactor to the open or navigate actions inside patchright_navigation.click, fill) fails due to a timeout, verify if the element is loaded by calling patchright_interaction with action wait_for and state visible.patchright_execution with action evaluate to trigger a native JS click: document.querySelector('selector').click().evaluate scripts execute in an isolated context (utility world) for anti-bot stealth.element.setAttribute('data-state', 'value')) rather than attaching them directly to window.propertyName.patchright_navigation with action screenshot to verify if a challenge is present.9222 falls back to a subprocess launch, verify if the process crashed by retrying open. The server automatically spins up a local fallback browser if the remote socket is unresponsive.共 2 个版本