[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-browser-use-browser-execute":3,"mdc-lfuxgc-key":30,"related-org-browser-use-browser-execute":4442,"related-repo-browser-use-browser-execute":4624},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":19,"repoUrl":20,"updatedAt":21,"license":22,"forks":23,"topics":24,"repo":25,"sourceUrl":28,"mdContent":29},"browser-execute","execute browser automation tasks","Use ONLY when calling the `browser_execute` tool or driving a real browser via the Chrome DevTools Protocol. Required reading before the first `browser_execute` call in a session. Covers the three connection methods (local Chrome with remote debugging, isolated debug-port profile, Browser Use cloud), the in-process `session` \u002F `console` snippet model, attaching to a page target, common CDP commands, the per-project `.bcode\u002Fagent-workspace\u002F` for reusable scripts, and screenshot auto-attachment.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"browser-use","Browser-use","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fbrowser-use.png",[12,16],{"name":13,"slug":14,"type":15},"Debugging","debugging","tag",{"name":17,"slug":18,"type":15},"Browser Automation","browser-automation",255,"https:\u002F\u002Fgithub.com\u002Fbrowser-use\u002Fbrowsercode","2026-07-31T05:55:46.960752",null,35,[],{"repoUrl":20,"stars":19,"forks":23,"topics":26,"description":27},[],"The browser-native agent framework","https:\u002F\u002Fgithub.com\u002Fbrowser-use\u002Fbrowsercode\u002Ftree\u002FHEAD\u002Fpackages\u002Fbcode-browser\u002Fskills\u002Fbrowser-execute","---\nname: browser-execute\ndescription: Use ONLY when calling the `browser_execute` tool or driving a real browser via the Chrome DevTools Protocol. Required reading before the first `browser_execute` call in a session. Covers the three connection methods (local Chrome with remote debugging, isolated debug-port profile, Browser Use cloud), the in-process `session` \u002F `console` snippet model, attaching to a page target, common CDP commands, the per-project `.bcode\u002Fagent-workspace\u002F` for reusable scripts, and screenshot auto-attachment.\n---\n\nThe `browser_execute` tool evaluates JavaScript against a connected browser `session` via the Chrome DevTools Protocol.\nThe snippet runs in-process; `session` is bound to a long-lived CDP `Session` that persists.\nThere is no helper namespace, just `session`, `console`, and standard JS globals. \n\nWorkspace: `\u003CprojectRoot>\u002F.bcode\u002Fagent-workspace\u002F`. Read\u002Fwrite your reusable scripts here.\nSkills: `{{SKILLS_DIR}}\u002F`. Read-only browser execute reference docs.\n\n## Connecting\nIn Browser Use Cloud API V4, `browser_execute` automatically connects and attaches the existing page once when the fresh run first uses this tool; do not call `session.connect()` or `session.use()` before driving it.\nOtherwise, call `session.connect(...)` once at the start of your work. There are three connection methods:\n\n#### Way 1: connect to the user's running Chrome or Chromium-based browser (real profile, popup-gated). \nChoose when the task involves the user's logged-in sites, current browser state, cookies, saved data, etc.\n\n```js\n\u002F\u002F Attempts to connect to every detected Chrome, most-recently-launched first.\nawait session.connect()\n```\n\nFor this to work the user must have navigated to `chrome:\u002F\u002Finspect\u002F#remote-debugging` in their target Chrome and ticked \"Allow remote debugging for this browser instance\". This setting is per-profile and persists across every future launch of that profile. On Chrome 144 and later, the first attach also triggers an in-browser \"Allow remote debugging?\" popup that the user must click \"Allow\" on. The popup may reappear on later attaches under conditions that are not fully characterized — browser restart, time elapsed, new CDP session. Ask the user to click Allow again if a previously working connection starts 403'ing.\n\nFailure modes:\n- `connect()` throws \"No running browser with remote debugging detected\". The checkbox at `chrome:\u002F\u002Finspect\u002F#remote-debugging` has not been ticked in any running Chrome profile, or no Chrome is running.\n- `connect()` throws with \"403\" \u002F \"permission\" \u002F \"WS closed before open\". The checkbox is ticked but the user hasn't clicked Allow on the popup yet. By default `connect()` errors in 5s; pass `{ timeoutMs: 30000 }` to wait up to 30s for the click.\n\n#### Way 2: connect to a Chrome or Chromium-based browser launched with a debug port (isolated profile, no popups).\nChoose for unattended automation, or for an isolated browser.\n\nLaunch Chrome with `--remote-debugging-port=\u003Cport> --user-data-dir=\u003Cpath>`. Pick a directory you can access — e.g., a project-local one like `.\u002F.bcode\u002Fchrome-data-dir`.\n\n```bash\n# Linux\ngoogle-chrome --remote-debugging-port=9222 --user-data-dir=.\u002F.bcode\u002Fchrome-data-dir\n# macOS\n\"\u002FApplications\u002FGoogle Chrome.app\u002FContents\u002FMacOS\u002FGoogle Chrome\" \\\n  --remote-debugging-port=9222 --user-data-dir=.\u002F.bcode\u002Fchrome-data-dir\n# Windows (cmd.exe)\n\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" ^\n  --remote-debugging-port=9222 --user-data-dir=.\\.bcode\\chrome-data-dir\n# Windows (PowerShell)\n& \"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" `\n  --remote-debugging-port=9222 --user-data-dir=.\\.bcode\\chrome-data-dir\n```\n\n```js\n\u002F\u002F Resolve the live WebSocket URL via `\u002Fjson\u002Fversion` and connect:\nconst ver = await fetch(\"http:\u002F\u002F127.0.0.1:9222\u002Fjson\u002Fversion\").then(r => r.json())\nawait session.connect({ wsUrl: ver.webSocketDebuggerUrl })\n```\n\n`--user-data-dir` must not be Chrome's platform default. Chrome 136 and later silently no-ops the `--remote-debugging-port` flag when `--user-data-dir` is the platform default. The platform defaults are `%LOCALAPPDATA%\\Google\\Chrome\\User Data` on Windows, `~\u002FLibrary\u002FApplication Support\u002FGoogle\u002FChrome` on macOS, `~\u002F.config\u002Fgoogle-chrome` on Linux.\nYou cannot reuse the user's everyday Chrome profile by copying its files into a custom directory.\n\nFailure modes:\n- Chrome's launch log prints `DevTools listening on ws:\u002F\u002F...:\u003Cport>\u002F...` immediately followed by `bind() failed: Address already in use` and Chrome exits. Confirm the port is actually open with `curl http:\u002F\u002F127.0.0.1:\u003Cport>\u002Fjson\u002Fversion` before connecting.\n- `{ profileDir }` raises ENOENT on `DevToolsActivePort`. Chrome 147+ doesn't write this file under custom `--user-data-dir`; use the `\u002Fjson\u002Fversion` route above instead.\n- Launch silently no-ops `--remote-debugging-port`. Launching a second Chrome that points at a `--user-data-dir` matching a running process ignores `--remote-debugging-port`.\n\n#### Way 3: provision and connect to a Browser Use cloud browser.\nChoose when the computer has no browser or to work in the background.\n\n```js\n\u002F\u002F Provision and connect to a cloud browser\nconst r = await fetch(\"https:\u002F\u002Fapi.browser-use.com\u002Fapi\u002Fv3\u002Fbrowsers\", {\n  method: \"POST\",\n  headers: { \"X-Browser-Use-API-Key\": process.env.BROWSER_USE_API_KEY, \"Content-Type\": \"application\u002Fjson\" },\n  body: \"{}\",\n})\n\u002F\u002F Additional options: fetch https:\u002F\u002Fdocs.browser-use.com\u002Fcloud\u002Fapi-v3\u002Fbrowsers\u002Fcreate-browser-session\nconst { id, cdpUrl, liveUrl } = await r.json()\nconst ver = await fetch(`${cdpUrl}\u002Fjson\u002Fversion`).then(r => r.json())\nawait session.connect({ wsUrl: ver.webSocketDebuggerUrl })\nconsole.log(\"liveUrl for the user to watch:\", liveUrl)\n```\n\n```js\n\u002F\u002F Browser Use cloud will eventually close idle browsers. An explicit stop frees the slot:\nawait fetch(`https:\u002F\u002Fapi.browser-use.com\u002Fapi\u002Fv3\u002Fbrowsers\u002F${id}`, {\n  method: \"PATCH\",\n  headers: { \"X-Browser-Use-API-Key\": process.env.BROWSER_USE_API_KEY, \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({ action: \"stop\" }),\n})\n```\n\nA cloud browser is a paid service and requires `BROWSER_USE_API_KEY` to be set in the environment.\nBrowser Use cloud browsers auto-solve captchas. When you land on one, just stop driving and `await new Promise(r => setTimeout(r, 10000))`; the solver runs server-side and the page advances on its own.\nBrowser Use has a free tier gated for intelligent and powerful agents. Unlimited free browsers and proxies, limited to 3 concurrent browsers. Agents can sign up and receive a key fully autonomously, but must pass a proof-of-agent-capability challenge. In can be done without any browser. To begin, post or webfetch https:\u002F\u002Fbrowser-use.com and solve the challenge (see https:\u002F\u002Fbrowser-use.com\u002Fllms.txt or POST https:\u002F\u002Fapi.browser-use.com\u002Fcloud\u002Fsignup.).\n\n#### Way 4: user-preconfigured endpoint\nNot a method you choose — a way for the user to hand you a pre-set endpoint.\nWhen `V4_RUN_ID` and `BU_CDP_WS` (or its alias `BU_CDP_URL`) are both set, `browser_execute` connects to that endpoint and attaches its existing non-internal page once before the first snippet. Go straight to driving it. Other environments keep the explicit connection flow, and explicit `{ wsUrl }` \u002F `{ profileDir }` calls still connect to the requested endpoint instead.\nIf that fixed endpoint closes or repeatedly fails its WebSocket upgrade, reconnecting to the same URL cannot recover it; the endpoint owner must replace it.\n\n## Attaching to a target\nAfter connecting manually, attach to a page target before driving the browser. A preconfigured endpoint is already attached automatically:\n\n```js\nconst targets = (await session.Target.getTargets({})).targetInfos\n\u002F\u002F Pick the first non-internal tab if none was specified.\nconst page = targets.find(t => t.type === \"page\" && !t.url.startsWith(\"chrome:\u002F\u002F\"))\nawait session.use(page.targetId)\n```\n\nIf a target-scoped command throws `CdpError` code `-32001` (`Session with given id not found`), the browser connection is still usable but the target session is stale. List targets again, `session.use(...)` the intended page, and retry the rejected command once. Calling `session.connect()` without arguments is a no-op while connected; it does not replace a stale target session.\n\nEvery explicit reconnect or browser switch retires the previous socket and clears its active target attachment. Re-list targets, call `session.use(...)`, and rediscover DOM nodes and Runtime objects before continuing.\n\n## Driving a page\nDomain methods follow `session.\u003CDomain>.\u003Cmethod>(params)` and return Promises. \nThe full surface (652 commands) is the Chrome DevTools Protocol.\n`Object.keys(session.domains).sort()` lists every CDP domain bound on the session; `Object.keys(session.Page).sort()` lists the methods for `Page`. \nFor unknown param shapes, call with `{}` and inspect the thrown `CdpError` — `.data` carries the missing-field detail.\n\nCommon moves:\n\n```js\n\u002F\u002F Navigate. Register the load waiter BEFORE navigate so a fast load isn't missed.\nawait session.Page.enable()\nconst loaded = session.waitFor(\"Page.loadEventFired\", { timeoutMs: 15_000 })\nawait session.Page.navigate({ url: \"https:\u002F\u002Fexample.com\" })\nawait loaded\n\u002F\u002F Page.navigate resolves even on network errors — its result carries `errorText` when the load failed.\n\n\u002F\u002F Evaluate JS in the page.\nconst r = await session.Runtime.evaluate({\n  expression: \"document.title\",\n  returnByValue: true,\n})\nconsole.log(r.result.value)\n\n\u002F\u002F Click by coordinates.\nconst x = 200, y = 300\nawait session.Input.dispatchMouseEvent({ type: \"mouseMoved\", x, y })\nawait session.Input.dispatchMouseEvent({ type: \"mousePressed\", x, y, button: \"left\", clickCount: 1 })\nawait session.Input.dispatchMouseEvent({ type: \"mouseReleased\", x, y, button: \"left\", clickCount: 1 })\n\n\u002F\u002F Type text.\nawait session.Input.insertText({ text: \"hello\" })\n\n\u002F\u002F Screenshot.\nawait session.Page.captureScreenshot({ format: \"png\" })\n\u002F\u002F You see the image inline on the next turn — `browser_execute` automatically\n\u002F\u002F attaches every `Page.captureScreenshot` result. No need to decode, save, or\n\u002F\u002F `read` the bytes back. The base64 is still in `data` (via the return value)\n\u002F\u002F for the rare case you want to process it programmatically.\n```\n\n`Page.navigate` can return a non-empty `errorText` instead of throwing. Treat it as a failed navigation. If `ERR_TUNNEL_CONNECTION_FAILED` persists, reloading, reattaching, or reconnecting to the same endpoint cannot change its proxy route; use another source or replace the cloud browser instead of retrying it.\n\nNot auto-attaching a screenshot: attachment is keyed on the `Page.captureScreenshot` response; pixels that arrive as an event are never attached.\n\n```js\nawait session.Page.enable()\n\u002F\u002F Optional: screencast has no `clip`, so override the viewport for exact frame size.\nawait session.Emulation.setDeviceMetricsOverride({ width: 1200, height: 630, deviceScaleFactor: 1, mobile: false })\nconst frame = session.waitFor(\"Page.screencastFrame\", { timeoutMs: 10_000 })  \u002F\u002F register first\nawait session.Page.startScreencast({ format: \"png\" })\ntry {\n  const f = await frame        \u002F\u002F f.data is base64, same as captureScreenshot\n} finally {\n  await session.Page.stopScreencast()   \u002F\u002F otherwise the cast stays open\n}\n```\n\n## Reusing code\nThe agent-workspace is per-project: `.\u002F.bcode\u002Fagent-workspace\u002F`. \nUse this to write memory files, scripts, and helper functions.\nImports work at any depth; pick whatever layout makes the project easiest to navigate.\n\n```ts\n\u002F\u002F .\u002F.bcode\u002Fagent-workspace\u002Fscrape_titles.ts (you write this with the `write` tool)\nexport async function scrapeTitles(session: any, urls: string[]) {\n  const titles: string[] = []\n  await session.Page.enable()\n  for (const url of urls) {\n    const loaded = session.waitFor(\"Page.loadEventFired\", { timeoutMs: 15_000 })\n    await session.Page.navigate({ url })\n    await loaded\n    const r = await session.Runtime.evaluate({ expression: \"document.title\", returnByValue: true })\n    titles.push(r.result.value)\n  }\n  return titles\n}\n```\n\n```js\n\u002F\u002F later snippet\nconst path = process.cwd() + \"\u002F.bcode\u002Fagent-workspace\u002Fscrape_titles.ts\"\n\u002F\u002F Cache-bust (`?t=${Date.now()}`) is your responsibility: without it, edits to the file won't be picked up. \nconst m = await import(`${path}?t=${Date.now()}`)\nconst titles = await m.scrapeTitles(session, [\"https:\u002F\u002Fexample.com\", \"https:\u002F\u002Fexample.org\"])\nconsole.log(JSON.stringify(titles))\n```\n\n## Guardrails\n- Top-level `import` statements inside the snippet body are not allowed. Use `await import(...)` instead.\n- No CPU-bound infinite loops without `await` — they ignore the timeout. Insert `await new Promise(r => setTimeout(r, 0))` to yield.\n- `browser_execute` defaults to 60s (max 600s). For longer work, set the tool's top-level `timeout`; inner CDP timeouts do not extend it. Keep batches small and log progress — timeout errors return recent logs, and a timeout resets the CDP session. Reconnect deliberately after a timeout so a run that switched browsers cannot silently return to its original browser.\n\n## Console\n- `console.log`, `console.error`, `console.warn`, `console.info`, `console.debug` are all captured and streamed to the user. Treat them as your stdout. Other `console.*` methods write to bcode's stderr without being captured into the tool result.\n- The snippet's `return` value is captured separately (JSON-serialized when possible).\n",{"data":31,"body":32},{"name":4,"description":6},{"type":33,"children":34},"root",[35,90,111,118,154,161,166,222,235,240,288,294,299,319,541,714,763,767,858,864,869,1360,1616,1662,1668,1719,1725,1730,1977,2020,2032,2038,2097,2102,3074,3101,3114,3522,3528,3541,4031,4300,4306,4368,4373,4436],{"type":36,"tag":37,"props":38,"children":39},"element","p",{},[40,43,50,52,58,60,65,67,73,75,80,82,88],{"type":41,"value":42},"text","The ",{"type":36,"tag":44,"props":45,"children":47},"code",{"className":46},[],[48],{"type":41,"value":49},"browser_execute",{"type":41,"value":51}," tool evaluates JavaScript against a connected browser ",{"type":36,"tag":44,"props":53,"children":55},{"className":54},[],[56],{"type":41,"value":57},"session",{"type":41,"value":59}," via the Chrome DevTools Protocol.\nThe snippet runs in-process; ",{"type":36,"tag":44,"props":61,"children":63},{"className":62},[],[64],{"type":41,"value":57},{"type":41,"value":66}," is bound to a long-lived CDP ",{"type":36,"tag":44,"props":68,"children":70},{"className":69},[],[71],{"type":41,"value":72},"Session",{"type":41,"value":74}," that persists.\nThere is no helper namespace, just ",{"type":36,"tag":44,"props":76,"children":78},{"className":77},[],[79],{"type":41,"value":57},{"type":41,"value":81},", ",{"type":36,"tag":44,"props":83,"children":85},{"className":84},[],[86],{"type":41,"value":87},"console",{"type":41,"value":89},", and standard JS globals.",{"type":36,"tag":37,"props":91,"children":92},{},[93,95,101,103,109],{"type":41,"value":94},"Workspace: ",{"type":36,"tag":44,"props":96,"children":98},{"className":97},[],[99],{"type":41,"value":100},"\u003CprojectRoot>\u002F.bcode\u002Fagent-workspace\u002F",{"type":41,"value":102},". Read\u002Fwrite your reusable scripts here.\nSkills: ",{"type":36,"tag":44,"props":104,"children":106},{"className":105},[],[107],{"type":41,"value":108},"{{SKILLS_DIR}}\u002F",{"type":41,"value":110},". Read-only browser execute reference docs.",{"type":36,"tag":112,"props":113,"children":115},"h2",{"id":114},"connecting",[116],{"type":41,"value":117},"Connecting",{"type":36,"tag":37,"props":119,"children":120},{},[121,123,128,130,136,138,144,146,152],{"type":41,"value":122},"In Browser Use Cloud API V4, ",{"type":36,"tag":44,"props":124,"children":126},{"className":125},[],[127],{"type":41,"value":49},{"type":41,"value":129}," automatically connects and attaches the existing page once when the fresh run first uses this tool; do not call ",{"type":36,"tag":44,"props":131,"children":133},{"className":132},[],[134],{"type":41,"value":135},"session.connect()",{"type":41,"value":137}," or ",{"type":36,"tag":44,"props":139,"children":141},{"className":140},[],[142],{"type":41,"value":143},"session.use()",{"type":41,"value":145}," before driving it.\nOtherwise, call ",{"type":36,"tag":44,"props":147,"children":149},{"className":148},[],[150],{"type":41,"value":151},"session.connect(...)",{"type":41,"value":153}," once at the start of your work. There are three connection methods:",{"type":36,"tag":155,"props":156,"children":158},"h4",{"id":157},"way-1-connect-to-the-users-running-chrome-or-chromium-based-browser-real-profile-popup-gated",[159],{"type":41,"value":160},"Way 1: connect to the user's running Chrome or Chromium-based browser (real profile, popup-gated).",{"type":36,"tag":37,"props":162,"children":163},{},[164],{"type":41,"value":165},"Choose when the task involves the user's logged-in sites, current browser state, cookies, saved data, etc.",{"type":36,"tag":167,"props":168,"children":173},"pre",{"className":169,"code":170,"language":171,"meta":172,"style":172},"language-js shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Attempts to connect to every detected Chrome, most-recently-launched first.\nawait session.connect()\n","js","",[174],{"type":36,"tag":44,"props":175,"children":176},{"__ignoreMap":172},[177,189],{"type":36,"tag":178,"props":179,"children":182},"span",{"class":180,"line":181},"line",1,[183],{"type":36,"tag":178,"props":184,"children":186},{"style":185},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[187],{"type":41,"value":188},"\u002F\u002F Attempts to connect to every detected Chrome, most-recently-launched first.\n",{"type":36,"tag":178,"props":190,"children":192},{"class":180,"line":191},2,[193,199,205,211,217],{"type":36,"tag":178,"props":194,"children":196},{"style":195},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[197],{"type":41,"value":198},"await",{"type":36,"tag":178,"props":200,"children":202},{"style":201},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[203],{"type":41,"value":204}," session",{"type":36,"tag":178,"props":206,"children":208},{"style":207},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[209],{"type":41,"value":210},".",{"type":36,"tag":178,"props":212,"children":214},{"style":213},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[215],{"type":41,"value":216},"connect",{"type":36,"tag":178,"props":218,"children":219},{"style":201},[220],{"type":41,"value":221},"()\n",{"type":36,"tag":37,"props":223,"children":224},{},[225,227,233],{"type":41,"value":226},"For this to work the user must have navigated to ",{"type":36,"tag":44,"props":228,"children":230},{"className":229},[],[231],{"type":41,"value":232},"chrome:\u002F\u002Finspect\u002F#remote-debugging",{"type":41,"value":234}," in their target Chrome and ticked \"Allow remote debugging for this browser instance\". This setting is per-profile and persists across every future launch of that profile. On Chrome 144 and later, the first attach also triggers an in-browser \"Allow remote debugging?\" popup that the user must click \"Allow\" on. The popup may reappear on later attaches under conditions that are not fully characterized — browser restart, time elapsed, new CDP session. Ask the user to click Allow again if a previously working connection starts 403'ing.",{"type":36,"tag":37,"props":236,"children":237},{},[238],{"type":41,"value":239},"Failure modes:",{"type":36,"tag":241,"props":242,"children":243},"ul",{},[244,263],{"type":36,"tag":245,"props":246,"children":247},"li",{},[248,254,256,261],{"type":36,"tag":44,"props":249,"children":251},{"className":250},[],[252],{"type":41,"value":253},"connect()",{"type":41,"value":255}," throws \"No running browser with remote debugging detected\". The checkbox at ",{"type":36,"tag":44,"props":257,"children":259},{"className":258},[],[260],{"type":41,"value":232},{"type":41,"value":262}," has not been ticked in any running Chrome profile, or no Chrome is running.",{"type":36,"tag":245,"props":264,"children":265},{},[266,271,273,278,280,286],{"type":36,"tag":44,"props":267,"children":269},{"className":268},[],[270],{"type":41,"value":253},{"type":41,"value":272}," throws with \"403\" \u002F \"permission\" \u002F \"WS closed before open\". The checkbox is ticked but the user hasn't clicked Allow on the popup yet. By default ",{"type":36,"tag":44,"props":274,"children":276},{"className":275},[],[277],{"type":41,"value":253},{"type":41,"value":279}," errors in 5s; pass ",{"type":36,"tag":44,"props":281,"children":283},{"className":282},[],[284],{"type":41,"value":285},"{ timeoutMs: 30000 }",{"type":41,"value":287}," to wait up to 30s for the click.",{"type":36,"tag":155,"props":289,"children":291},{"id":290},"way-2-connect-to-a-chrome-or-chromium-based-browser-launched-with-a-debug-port-isolated-profile-no-popups",[292],{"type":41,"value":293},"Way 2: connect to a Chrome or Chromium-based browser launched with a debug port (isolated profile, no popups).",{"type":36,"tag":37,"props":295,"children":296},{},[297],{"type":41,"value":298},"Choose for unattended automation, or for an isolated browser.",{"type":36,"tag":37,"props":300,"children":301},{},[302,304,310,312,318],{"type":41,"value":303},"Launch Chrome with ",{"type":36,"tag":44,"props":305,"children":307},{"className":306},[],[308],{"type":41,"value":309},"--remote-debugging-port=\u003Cport> --user-data-dir=\u003Cpath>",{"type":41,"value":311},". Pick a directory you can access — e.g., a project-local one like ",{"type":36,"tag":44,"props":313,"children":315},{"className":314},[],[316],{"type":41,"value":317},".\u002F.bcode\u002Fchrome-data-dir",{"type":41,"value":210},{"type":36,"tag":167,"props":320,"children":324},{"className":321,"code":322,"language":323,"meta":172,"style":172},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Linux\ngoogle-chrome --remote-debugging-port=9222 --user-data-dir=.\u002F.bcode\u002Fchrome-data-dir\n# macOS\n\"\u002FApplications\u002FGoogle Chrome.app\u002FContents\u002FMacOS\u002FGoogle Chrome\" \\\n  --remote-debugging-port=9222 --user-data-dir=.\u002F.bcode\u002Fchrome-data-dir\n# Windows (cmd.exe)\n\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" ^\n  --remote-debugging-port=9222 --user-data-dir=.\\.bcode\\chrome-data-dir\n# Windows (PowerShell)\n& \"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" `\n  --remote-debugging-port=9222 --user-data-dir=.\\.bcode\\chrome-data-dir\n","bash",[325],{"type":36,"tag":44,"props":326,"children":327},{"__ignoreMap":172},[328,336,356,365,379,392,401,415,467,476,495],{"type":36,"tag":178,"props":329,"children":330},{"class":180,"line":181},[331],{"type":36,"tag":178,"props":332,"children":333},{"style":185},[334],{"type":41,"value":335},"# Linux\n",{"type":36,"tag":178,"props":337,"children":338},{"class":180,"line":191},[339,345,351],{"type":36,"tag":178,"props":340,"children":342},{"style":341},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[343],{"type":41,"value":344},"google-chrome",{"type":36,"tag":178,"props":346,"children":348},{"style":347},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[349],{"type":41,"value":350}," --remote-debugging-port=9222",{"type":36,"tag":178,"props":352,"children":353},{"style":347},[354],{"type":41,"value":355}," --user-data-dir=.\u002F.bcode\u002Fchrome-data-dir\n",{"type":36,"tag":178,"props":357,"children":359},{"class":180,"line":358},3,[360],{"type":36,"tag":178,"props":361,"children":362},{"style":185},[363],{"type":41,"value":364},"# macOS\n",{"type":36,"tag":178,"props":366,"children":368},{"class":180,"line":367},4,[369,374],{"type":36,"tag":178,"props":370,"children":371},{"style":341},[372],{"type":41,"value":373},"\"\u002FApplications\u002FGoogle Chrome.app\u002FContents\u002FMacOS\u002FGoogle Chrome\"",{"type":36,"tag":178,"props":375,"children":376},{"style":201},[377],{"type":41,"value":378}," \\\n",{"type":36,"tag":178,"props":380,"children":382},{"class":180,"line":381},5,[383,388],{"type":36,"tag":178,"props":384,"children":385},{"style":347},[386],{"type":41,"value":387},"  --remote-debugging-port=9222",{"type":36,"tag":178,"props":389,"children":390},{"style":347},[391],{"type":41,"value":355},{"type":36,"tag":178,"props":393,"children":395},{"class":180,"line":394},6,[396],{"type":36,"tag":178,"props":397,"children":398},{"style":185},[399],{"type":41,"value":400},"# Windows (cmd.exe)\n",{"type":36,"tag":178,"props":402,"children":404},{"class":180,"line":403},7,[405,410],{"type":36,"tag":178,"props":406,"children":407},{"style":341},[408],{"type":41,"value":409},"\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\"",{"type":36,"tag":178,"props":411,"children":412},{"style":347},[413],{"type":41,"value":414}," ^\n",{"type":36,"tag":178,"props":416,"children":418},{"class":180,"line":417},8,[419,424,429,434,439,443,447,452,457,462],{"type":36,"tag":178,"props":420,"children":421},{"style":201},[422],{"type":41,"value":423},"  --remote-debugging-port",{"type":36,"tag":178,"props":425,"children":426},{"style":207},[427],{"type":41,"value":428},"=",{"type":36,"tag":178,"props":430,"children":431},{"style":347},[432],{"type":41,"value":433},"9222",{"type":36,"tag":178,"props":435,"children":436},{"style":201},[437],{"type":41,"value":438}," --user-data-dir",{"type":36,"tag":178,"props":440,"children":441},{"style":207},[442],{"type":41,"value":428},{"type":36,"tag":178,"props":444,"children":445},{"style":347},[446],{"type":41,"value":210},{"type":36,"tag":178,"props":448,"children":449},{"style":201},[450],{"type":41,"value":451},"\\.",{"type":36,"tag":178,"props":453,"children":454},{"style":347},[455],{"type":41,"value":456},"bcode",{"type":36,"tag":178,"props":458,"children":459},{"style":201},[460],{"type":41,"value":461},"\\c",{"type":36,"tag":178,"props":463,"children":464},{"style":347},[465],{"type":41,"value":466},"hrome-data-dir\n",{"type":36,"tag":178,"props":468,"children":470},{"class":180,"line":469},9,[471],{"type":36,"tag":178,"props":472,"children":473},{"style":185},[474],{"type":41,"value":475},"# Windows (PowerShell)\n",{"type":36,"tag":178,"props":477,"children":479},{"class":180,"line":478},10,[480,485,490],{"type":36,"tag":178,"props":481,"children":482},{"style":207},[483],{"type":41,"value":484},"&",{"type":36,"tag":178,"props":486,"children":487},{"style":341},[488],{"type":41,"value":489}," \"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\"",{"type":36,"tag":178,"props":491,"children":492},{"style":207},[493],{"type":41,"value":494}," `\n",{"type":36,"tag":178,"props":496,"children":498},{"class":180,"line":497},11,[499,503,507,512,517,521,525,529,533,537],{"type":36,"tag":178,"props":500,"children":501},{"style":201},[502],{"type":41,"value":423},{"type":36,"tag":178,"props":504,"children":505},{"style":207},[506],{"type":41,"value":428},{"type":36,"tag":178,"props":508,"children":509},{"style":347},[510],{"type":41,"value":511},"9222 ",{"type":36,"tag":178,"props":513,"children":514},{"style":201},[515],{"type":41,"value":516},"--user-data-dir",{"type":36,"tag":178,"props":518,"children":519},{"style":207},[520],{"type":41,"value":428},{"type":36,"tag":178,"props":522,"children":523},{"style":347},[524],{"type":41,"value":210},{"type":36,"tag":178,"props":526,"children":527},{"style":201},[528],{"type":41,"value":451},{"type":36,"tag":178,"props":530,"children":531},{"style":347},[532],{"type":41,"value":456},{"type":36,"tag":178,"props":534,"children":535},{"style":201},[536],{"type":41,"value":461},{"type":36,"tag":178,"props":538,"children":539},{"style":347},[540],{"type":41,"value":466},{"type":36,"tag":167,"props":542,"children":544},{"className":169,"code":543,"language":171,"meta":172,"style":172},"\u002F\u002F Resolve the live WebSocket URL via `\u002Fjson\u002Fversion` and connect:\nconst ver = await fetch(\"http:\u002F\u002F127.0.0.1:9222\u002Fjson\u002Fversion\").then(r => r.json())\nawait session.connect({ wsUrl: ver.webSocketDebuggerUrl })\n",[545],{"type":36,"tag":44,"props":546,"children":547},{"__ignoreMap":172},[548,556,651],{"type":36,"tag":178,"props":549,"children":550},{"class":180,"line":181},[551],{"type":36,"tag":178,"props":552,"children":553},{"style":185},[554],{"type":41,"value":555},"\u002F\u002F Resolve the live WebSocket URL via `\u002Fjson\u002Fversion` and connect:\n",{"type":36,"tag":178,"props":557,"children":558},{"class":180,"line":191},[559,565,570,574,579,584,589,594,599,603,608,612,617,621,627,632,637,641,646],{"type":36,"tag":178,"props":560,"children":562},{"style":561},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[563],{"type":41,"value":564},"const",{"type":36,"tag":178,"props":566,"children":567},{"style":201},[568],{"type":41,"value":569}," ver ",{"type":36,"tag":178,"props":571,"children":572},{"style":207},[573],{"type":41,"value":428},{"type":36,"tag":178,"props":575,"children":576},{"style":195},[577],{"type":41,"value":578}," await",{"type":36,"tag":178,"props":580,"children":581},{"style":213},[582],{"type":41,"value":583}," fetch",{"type":36,"tag":178,"props":585,"children":586},{"style":201},[587],{"type":41,"value":588},"(",{"type":36,"tag":178,"props":590,"children":591},{"style":207},[592],{"type":41,"value":593},"\"",{"type":36,"tag":178,"props":595,"children":596},{"style":347},[597],{"type":41,"value":598},"http:\u002F\u002F127.0.0.1:9222\u002Fjson\u002Fversion",{"type":36,"tag":178,"props":600,"children":601},{"style":207},[602],{"type":41,"value":593},{"type":36,"tag":178,"props":604,"children":605},{"style":201},[606],{"type":41,"value":607},")",{"type":36,"tag":178,"props":609,"children":610},{"style":207},[611],{"type":41,"value":210},{"type":36,"tag":178,"props":613,"children":614},{"style":213},[615],{"type":41,"value":616},"then",{"type":36,"tag":178,"props":618,"children":619},{"style":201},[620],{"type":41,"value":588},{"type":36,"tag":178,"props":622,"children":624},{"style":623},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[625],{"type":41,"value":626},"r",{"type":36,"tag":178,"props":628,"children":629},{"style":561},[630],{"type":41,"value":631}," =>",{"type":36,"tag":178,"props":633,"children":634},{"style":201},[635],{"type":41,"value":636}," r",{"type":36,"tag":178,"props":638,"children":639},{"style":207},[640],{"type":41,"value":210},{"type":36,"tag":178,"props":642,"children":643},{"style":213},[644],{"type":41,"value":645},"json",{"type":36,"tag":178,"props":647,"children":648},{"style":201},[649],{"type":41,"value":650},"())\n",{"type":36,"tag":178,"props":652,"children":653},{"class":180,"line":358},[654,658,662,666,670,674,679,685,690,695,699,704,709],{"type":36,"tag":178,"props":655,"children":656},{"style":195},[657],{"type":41,"value":198},{"type":36,"tag":178,"props":659,"children":660},{"style":201},[661],{"type":41,"value":204},{"type":36,"tag":178,"props":663,"children":664},{"style":207},[665],{"type":41,"value":210},{"type":36,"tag":178,"props":667,"children":668},{"style":213},[669],{"type":41,"value":216},{"type":36,"tag":178,"props":671,"children":672},{"style":201},[673],{"type":41,"value":588},{"type":36,"tag":178,"props":675,"children":676},{"style":207},[677],{"type":41,"value":678},"{",{"type":36,"tag":178,"props":680,"children":682},{"style":681},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[683],{"type":41,"value":684}," wsUrl",{"type":36,"tag":178,"props":686,"children":687},{"style":207},[688],{"type":41,"value":689},":",{"type":36,"tag":178,"props":691,"children":692},{"style":201},[693],{"type":41,"value":694}," ver",{"type":36,"tag":178,"props":696,"children":697},{"style":207},[698],{"type":41,"value":210},{"type":36,"tag":178,"props":700,"children":701},{"style":201},[702],{"type":41,"value":703},"webSocketDebuggerUrl ",{"type":36,"tag":178,"props":705,"children":706},{"style":207},[707],{"type":41,"value":708},"}",{"type":36,"tag":178,"props":710,"children":711},{"style":201},[712],{"type":41,"value":713},")\n",{"type":36,"tag":37,"props":715,"children":716},{},[717,722,724,730,732,737,739,745,747,753,755,761],{"type":36,"tag":44,"props":718,"children":720},{"className":719},[],[721],{"type":41,"value":516},{"type":41,"value":723}," must not be Chrome's platform default. Chrome 136 and later silently no-ops the ",{"type":36,"tag":44,"props":725,"children":727},{"className":726},[],[728],{"type":41,"value":729},"--remote-debugging-port",{"type":41,"value":731}," flag when ",{"type":36,"tag":44,"props":733,"children":735},{"className":734},[],[736],{"type":41,"value":516},{"type":41,"value":738}," is the platform default. The platform defaults are ",{"type":36,"tag":44,"props":740,"children":742},{"className":741},[],[743],{"type":41,"value":744},"%LOCALAPPDATA%\\Google\\Chrome\\User Data",{"type":41,"value":746}," on Windows, ",{"type":36,"tag":44,"props":748,"children":750},{"className":749},[],[751],{"type":41,"value":752},"~\u002FLibrary\u002FApplication Support\u002FGoogle\u002FChrome",{"type":41,"value":754}," on macOS, ",{"type":36,"tag":44,"props":756,"children":758},{"className":757},[],[759],{"type":41,"value":760},"~\u002F.config\u002Fgoogle-chrome",{"type":41,"value":762}," on Linux.\nYou cannot reuse the user's everyday Chrome profile by copying its files into a custom directory.",{"type":36,"tag":37,"props":764,"children":765},{},[766],{"type":41,"value":239},{"type":36,"tag":241,"props":768,"children":769},{},[770,799,833],{"type":36,"tag":245,"props":771,"children":772},{},[773,775,781,783,789,791,797],{"type":41,"value":774},"Chrome's launch log prints ",{"type":36,"tag":44,"props":776,"children":778},{"className":777},[],[779],{"type":41,"value":780},"DevTools listening on ws:\u002F\u002F...:\u003Cport>\u002F...",{"type":41,"value":782}," immediately followed by ",{"type":36,"tag":44,"props":784,"children":786},{"className":785},[],[787],{"type":41,"value":788},"bind() failed: Address already in use",{"type":41,"value":790}," and Chrome exits. Confirm the port is actually open with ",{"type":36,"tag":44,"props":792,"children":794},{"className":793},[],[795],{"type":41,"value":796},"curl http:\u002F\u002F127.0.0.1:\u003Cport>\u002Fjson\u002Fversion",{"type":41,"value":798}," before connecting.",{"type":36,"tag":245,"props":800,"children":801},{},[802,808,810,816,818,823,825,831],{"type":36,"tag":44,"props":803,"children":805},{"className":804},[],[806],{"type":41,"value":807},"{ profileDir }",{"type":41,"value":809}," raises ENOENT on ",{"type":36,"tag":44,"props":811,"children":813},{"className":812},[],[814],{"type":41,"value":815},"DevToolsActivePort",{"type":41,"value":817},". Chrome 147+ doesn't write this file under custom ",{"type":36,"tag":44,"props":819,"children":821},{"className":820},[],[822],{"type":41,"value":516},{"type":41,"value":824},"; use the ",{"type":36,"tag":44,"props":826,"children":828},{"className":827},[],[829],{"type":41,"value":830},"\u002Fjson\u002Fversion",{"type":41,"value":832}," route above instead.",{"type":36,"tag":245,"props":834,"children":835},{},[836,838,843,845,850,852,857],{"type":41,"value":837},"Launch silently no-ops ",{"type":36,"tag":44,"props":839,"children":841},{"className":840},[],[842],{"type":41,"value":729},{"type":41,"value":844},". Launching a second Chrome that points at a ",{"type":36,"tag":44,"props":846,"children":848},{"className":847},[],[849],{"type":41,"value":516},{"type":41,"value":851}," matching a running process ignores ",{"type":36,"tag":44,"props":853,"children":855},{"className":854},[],[856],{"type":41,"value":729},{"type":41,"value":210},{"type":36,"tag":155,"props":859,"children":861},{"id":860},"way-3-provision-and-connect-to-a-browser-use-cloud-browser",[862],{"type":41,"value":863},"Way 3: provision and connect to a Browser Use cloud browser.",{"type":36,"tag":37,"props":865,"children":866},{},[867],{"type":41,"value":868},"Choose when the computer has no browser or to work in the background.",{"type":36,"tag":167,"props":870,"children":872},{"className":169,"code":871,"language":171,"meta":172,"style":172},"\u002F\u002F Provision and connect to a cloud browser\nconst r = await fetch(\"https:\u002F\u002Fapi.browser-use.com\u002Fapi\u002Fv3\u002Fbrowsers\", {\n  method: \"POST\",\n  headers: { \"X-Browser-Use-API-Key\": process.env.BROWSER_USE_API_KEY, \"Content-Type\": \"application\u002Fjson\" },\n  body: \"{}\",\n})\n\u002F\u002F Additional options: fetch https:\u002F\u002Fdocs.browser-use.com\u002Fcloud\u002Fapi-v3\u002Fbrowsers\u002Fcreate-browser-session\nconst { id, cdpUrl, liveUrl } = await r.json()\nconst ver = await fetch(`${cdpUrl}\u002Fjson\u002Fversion`).then(r => r.json())\nawait session.connect({ wsUrl: ver.webSocketDebuggerUrl })\nconsole.log(\"liveUrl for the user to watch:\", liveUrl)\n",[873],{"type":36,"tag":44,"props":874,"children":875},{"__ignoreMap":172},[876,884,935,966,1062,1091,1102,1110,1173,1263,1318],{"type":36,"tag":178,"props":877,"children":878},{"class":180,"line":181},[879],{"type":36,"tag":178,"props":880,"children":881},{"style":185},[882],{"type":41,"value":883},"\u002F\u002F Provision and connect to a cloud browser\n",{"type":36,"tag":178,"props":885,"children":886},{"class":180,"line":191},[887,891,896,900,904,908,912,916,921,925,930],{"type":36,"tag":178,"props":888,"children":889},{"style":561},[890],{"type":41,"value":564},{"type":36,"tag":178,"props":892,"children":893},{"style":201},[894],{"type":41,"value":895}," r ",{"type":36,"tag":178,"props":897,"children":898},{"style":207},[899],{"type":41,"value":428},{"type":36,"tag":178,"props":901,"children":902},{"style":195},[903],{"type":41,"value":578},{"type":36,"tag":178,"props":905,"children":906},{"style":213},[907],{"type":41,"value":583},{"type":36,"tag":178,"props":909,"children":910},{"style":201},[911],{"type":41,"value":588},{"type":36,"tag":178,"props":913,"children":914},{"style":207},[915],{"type":41,"value":593},{"type":36,"tag":178,"props":917,"children":918},{"style":347},[919],{"type":41,"value":920},"https:\u002F\u002Fapi.browser-use.com\u002Fapi\u002Fv3\u002Fbrowsers",{"type":36,"tag":178,"props":922,"children":923},{"style":207},[924],{"type":41,"value":593},{"type":36,"tag":178,"props":926,"children":927},{"style":207},[928],{"type":41,"value":929},",",{"type":36,"tag":178,"props":931,"children":932},{"style":207},[933],{"type":41,"value":934}," {\n",{"type":36,"tag":178,"props":936,"children":937},{"class":180,"line":358},[938,943,947,952,957,961],{"type":36,"tag":178,"props":939,"children":940},{"style":681},[941],{"type":41,"value":942},"  method",{"type":36,"tag":178,"props":944,"children":945},{"style":207},[946],{"type":41,"value":689},{"type":36,"tag":178,"props":948,"children":949},{"style":207},[950],{"type":41,"value":951}," \"",{"type":36,"tag":178,"props":953,"children":954},{"style":347},[955],{"type":41,"value":956},"POST",{"type":36,"tag":178,"props":958,"children":959},{"style":207},[960],{"type":41,"value":593},{"type":36,"tag":178,"props":962,"children":963},{"style":207},[964],{"type":41,"value":965},",\n",{"type":36,"tag":178,"props":967,"children":968},{"class":180,"line":367},[969,974,978,983,987,992,996,1000,1005,1009,1014,1018,1023,1027,1031,1036,1040,1044,1048,1053,1057],{"type":36,"tag":178,"props":970,"children":971},{"style":681},[972],{"type":41,"value":973},"  headers",{"type":36,"tag":178,"props":975,"children":976},{"style":207},[977],{"type":41,"value":689},{"type":36,"tag":178,"props":979,"children":980},{"style":207},[981],{"type":41,"value":982}," {",{"type":36,"tag":178,"props":984,"children":985},{"style":207},[986],{"type":41,"value":951},{"type":36,"tag":178,"props":988,"children":989},{"style":681},[990],{"type":41,"value":991},"X-Browser-Use-API-Key",{"type":36,"tag":178,"props":993,"children":994},{"style":207},[995],{"type":41,"value":593},{"type":36,"tag":178,"props":997,"children":998},{"style":207},[999],{"type":41,"value":689},{"type":36,"tag":178,"props":1001,"children":1002},{"style":201},[1003],{"type":41,"value":1004}," process",{"type":36,"tag":178,"props":1006,"children":1007},{"style":207},[1008],{"type":41,"value":210},{"type":36,"tag":178,"props":1010,"children":1011},{"style":201},[1012],{"type":41,"value":1013},"env",{"type":36,"tag":178,"props":1015,"children":1016},{"style":207},[1017],{"type":41,"value":210},{"type":36,"tag":178,"props":1019,"children":1020},{"style":201},[1021],{"type":41,"value":1022},"BROWSER_USE_API_KEY",{"type":36,"tag":178,"props":1024,"children":1025},{"style":207},[1026],{"type":41,"value":929},{"type":36,"tag":178,"props":1028,"children":1029},{"style":207},[1030],{"type":41,"value":951},{"type":36,"tag":178,"props":1032,"children":1033},{"style":681},[1034],{"type":41,"value":1035},"Content-Type",{"type":36,"tag":178,"props":1037,"children":1038},{"style":207},[1039],{"type":41,"value":593},{"type":36,"tag":178,"props":1041,"children":1042},{"style":207},[1043],{"type":41,"value":689},{"type":36,"tag":178,"props":1045,"children":1046},{"style":207},[1047],{"type":41,"value":951},{"type":36,"tag":178,"props":1049,"children":1050},{"style":347},[1051],{"type":41,"value":1052},"application\u002Fjson",{"type":36,"tag":178,"props":1054,"children":1055},{"style":207},[1056],{"type":41,"value":593},{"type":36,"tag":178,"props":1058,"children":1059},{"style":207},[1060],{"type":41,"value":1061}," },\n",{"type":36,"tag":178,"props":1063,"children":1064},{"class":180,"line":381},[1065,1070,1074,1078,1083,1087],{"type":36,"tag":178,"props":1066,"children":1067},{"style":681},[1068],{"type":41,"value":1069},"  body",{"type":36,"tag":178,"props":1071,"children":1072},{"style":207},[1073],{"type":41,"value":689},{"type":36,"tag":178,"props":1075,"children":1076},{"style":207},[1077],{"type":41,"value":951},{"type":36,"tag":178,"props":1079,"children":1080},{"style":347},[1081],{"type":41,"value":1082},"{}",{"type":36,"tag":178,"props":1084,"children":1085},{"style":207},[1086],{"type":41,"value":593},{"type":36,"tag":178,"props":1088,"children":1089},{"style":207},[1090],{"type":41,"value":965},{"type":36,"tag":178,"props":1092,"children":1093},{"class":180,"line":394},[1094,1098],{"type":36,"tag":178,"props":1095,"children":1096},{"style":207},[1097],{"type":41,"value":708},{"type":36,"tag":178,"props":1099,"children":1100},{"style":201},[1101],{"type":41,"value":713},{"type":36,"tag":178,"props":1103,"children":1104},{"class":180,"line":403},[1105],{"type":36,"tag":178,"props":1106,"children":1107},{"style":185},[1108],{"type":41,"value":1109},"\u002F\u002F Additional options: fetch https:\u002F\u002Fdocs.browser-use.com\u002Fcloud\u002Fapi-v3\u002Fbrowsers\u002Fcreate-browser-session\n",{"type":36,"tag":178,"props":1111,"children":1112},{"class":180,"line":417},[1113,1117,1121,1126,1130,1135,1139,1144,1148,1153,1157,1161,1165,1169],{"type":36,"tag":178,"props":1114,"children":1115},{"style":561},[1116],{"type":41,"value":564},{"type":36,"tag":178,"props":1118,"children":1119},{"style":207},[1120],{"type":41,"value":982},{"type":36,"tag":178,"props":1122,"children":1123},{"style":201},[1124],{"type":41,"value":1125}," id",{"type":36,"tag":178,"props":1127,"children":1128},{"style":207},[1129],{"type":41,"value":929},{"type":36,"tag":178,"props":1131,"children":1132},{"style":201},[1133],{"type":41,"value":1134}," cdpUrl",{"type":36,"tag":178,"props":1136,"children":1137},{"style":207},[1138],{"type":41,"value":929},{"type":36,"tag":178,"props":1140,"children":1141},{"style":201},[1142],{"type":41,"value":1143}," liveUrl ",{"type":36,"tag":178,"props":1145,"children":1146},{"style":207},[1147],{"type":41,"value":708},{"type":36,"tag":178,"props":1149,"children":1150},{"style":207},[1151],{"type":41,"value":1152}," =",{"type":36,"tag":178,"props":1154,"children":1155},{"style":195},[1156],{"type":41,"value":578},{"type":36,"tag":178,"props":1158,"children":1159},{"style":201},[1160],{"type":41,"value":636},{"type":36,"tag":178,"props":1162,"children":1163},{"style":207},[1164],{"type":41,"value":210},{"type":36,"tag":178,"props":1166,"children":1167},{"style":213},[1168],{"type":41,"value":645},{"type":36,"tag":178,"props":1170,"children":1171},{"style":201},[1172],{"type":41,"value":221},{"type":36,"tag":178,"props":1174,"children":1175},{"class":180,"line":469},[1176,1180,1184,1188,1192,1196,1200,1205,1210,1214,1218,1223,1227,1231,1235,1239,1243,1247,1251,1255,1259],{"type":36,"tag":178,"props":1177,"children":1178},{"style":561},[1179],{"type":41,"value":564},{"type":36,"tag":178,"props":1181,"children":1182},{"style":201},[1183],{"type":41,"value":569},{"type":36,"tag":178,"props":1185,"children":1186},{"style":207},[1187],{"type":41,"value":428},{"type":36,"tag":178,"props":1189,"children":1190},{"style":195},[1191],{"type":41,"value":578},{"type":36,"tag":178,"props":1193,"children":1194},{"style":213},[1195],{"type":41,"value":583},{"type":36,"tag":178,"props":1197,"children":1198},{"style":201},[1199],{"type":41,"value":588},{"type":36,"tag":178,"props":1201,"children":1202},{"style":207},[1203],{"type":41,"value":1204},"`${",{"type":36,"tag":178,"props":1206,"children":1207},{"style":201},[1208],{"type":41,"value":1209},"cdpUrl",{"type":36,"tag":178,"props":1211,"children":1212},{"style":207},[1213],{"type":41,"value":708},{"type":36,"tag":178,"props":1215,"children":1216},{"style":347},[1217],{"type":41,"value":830},{"type":36,"tag":178,"props":1219,"children":1220},{"style":207},[1221],{"type":41,"value":1222},"`",{"type":36,"tag":178,"props":1224,"children":1225},{"style":201},[1226],{"type":41,"value":607},{"type":36,"tag":178,"props":1228,"children":1229},{"style":207},[1230],{"type":41,"value":210},{"type":36,"tag":178,"props":1232,"children":1233},{"style":213},[1234],{"type":41,"value":616},{"type":36,"tag":178,"props":1236,"children":1237},{"style":201},[1238],{"type":41,"value":588},{"type":36,"tag":178,"props":1240,"children":1241},{"style":623},[1242],{"type":41,"value":626},{"type":36,"tag":178,"props":1244,"children":1245},{"style":561},[1246],{"type":41,"value":631},{"type":36,"tag":178,"props":1248,"children":1249},{"style":201},[1250],{"type":41,"value":636},{"type":36,"tag":178,"props":1252,"children":1253},{"style":207},[1254],{"type":41,"value":210},{"type":36,"tag":178,"props":1256,"children":1257},{"style":213},[1258],{"type":41,"value":645},{"type":36,"tag":178,"props":1260,"children":1261},{"style":201},[1262],{"type":41,"value":650},{"type":36,"tag":178,"props":1264,"children":1265},{"class":180,"line":478},[1266,1270,1274,1278,1282,1286,1290,1294,1298,1302,1306,1310,1314],{"type":36,"tag":178,"props":1267,"children":1268},{"style":195},[1269],{"type":41,"value":198},{"type":36,"tag":178,"props":1271,"children":1272},{"style":201},[1273],{"type":41,"value":204},{"type":36,"tag":178,"props":1275,"children":1276},{"style":207},[1277],{"type":41,"value":210},{"type":36,"tag":178,"props":1279,"children":1280},{"style":213},[1281],{"type":41,"value":216},{"type":36,"tag":178,"props":1283,"children":1284},{"style":201},[1285],{"type":41,"value":588},{"type":36,"tag":178,"props":1287,"children":1288},{"style":207},[1289],{"type":41,"value":678},{"type":36,"tag":178,"props":1291,"children":1292},{"style":681},[1293],{"type":41,"value":684},{"type":36,"tag":178,"props":1295,"children":1296},{"style":207},[1297],{"type":41,"value":689},{"type":36,"tag":178,"props":1299,"children":1300},{"style":201},[1301],{"type":41,"value":694},{"type":36,"tag":178,"props":1303,"children":1304},{"style":207},[1305],{"type":41,"value":210},{"type":36,"tag":178,"props":1307,"children":1308},{"style":201},[1309],{"type":41,"value":703},{"type":36,"tag":178,"props":1311,"children":1312},{"style":207},[1313],{"type":41,"value":708},{"type":36,"tag":178,"props":1315,"children":1316},{"style":201},[1317],{"type":41,"value":713},{"type":36,"tag":178,"props":1319,"children":1320},{"class":180,"line":497},[1321,1325,1329,1334,1338,1342,1347,1351,1355],{"type":36,"tag":178,"props":1322,"children":1323},{"style":201},[1324],{"type":41,"value":87},{"type":36,"tag":178,"props":1326,"children":1327},{"style":207},[1328],{"type":41,"value":210},{"type":36,"tag":178,"props":1330,"children":1331},{"style":213},[1332],{"type":41,"value":1333},"log",{"type":36,"tag":178,"props":1335,"children":1336},{"style":201},[1337],{"type":41,"value":588},{"type":36,"tag":178,"props":1339,"children":1340},{"style":207},[1341],{"type":41,"value":593},{"type":36,"tag":178,"props":1343,"children":1344},{"style":347},[1345],{"type":41,"value":1346},"liveUrl for the user to watch:",{"type":36,"tag":178,"props":1348,"children":1349},{"style":207},[1350],{"type":41,"value":593},{"type":36,"tag":178,"props":1352,"children":1353},{"style":207},[1354],{"type":41,"value":929},{"type":36,"tag":178,"props":1356,"children":1357},{"style":201},[1358],{"type":41,"value":1359}," liveUrl)\n",{"type":36,"tag":167,"props":1361,"children":1363},{"className":169,"code":1362,"language":171,"meta":172,"style":172},"\u002F\u002F Browser Use cloud will eventually close idle browsers. An explicit stop frees the slot:\nawait fetch(`https:\u002F\u002Fapi.browser-use.com\u002Fapi\u002Fv3\u002Fbrowsers\u002F${id}`, {\n  method: \"PATCH\",\n  headers: { \"X-Browser-Use-API-Key\": process.env.BROWSER_USE_API_KEY, \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({ action: \"stop\" }),\n})\n",[1364],{"type":36,"tag":44,"props":1365,"children":1366},{"__ignoreMap":172},[1367,1375,1422,1450,1537,1605],{"type":36,"tag":178,"props":1368,"children":1369},{"class":180,"line":181},[1370],{"type":36,"tag":178,"props":1371,"children":1372},{"style":185},[1373],{"type":41,"value":1374},"\u002F\u002F Browser Use cloud will eventually close idle browsers. An explicit stop frees the slot:\n",{"type":36,"tag":178,"props":1376,"children":1377},{"class":180,"line":191},[1378,1382,1386,1390,1394,1399,1404,1409,1414,1418],{"type":36,"tag":178,"props":1379,"children":1380},{"style":195},[1381],{"type":41,"value":198},{"type":36,"tag":178,"props":1383,"children":1384},{"style":213},[1385],{"type":41,"value":583},{"type":36,"tag":178,"props":1387,"children":1388},{"style":201},[1389],{"type":41,"value":588},{"type":36,"tag":178,"props":1391,"children":1392},{"style":207},[1393],{"type":41,"value":1222},{"type":36,"tag":178,"props":1395,"children":1396},{"style":347},[1397],{"type":41,"value":1398},"https:\u002F\u002Fapi.browser-use.com\u002Fapi\u002Fv3\u002Fbrowsers\u002F",{"type":36,"tag":178,"props":1400,"children":1401},{"style":207},[1402],{"type":41,"value":1403},"${",{"type":36,"tag":178,"props":1405,"children":1406},{"style":201},[1407],{"type":41,"value":1408},"id",{"type":36,"tag":178,"props":1410,"children":1411},{"style":207},[1412],{"type":41,"value":1413},"}`",{"type":36,"tag":178,"props":1415,"children":1416},{"style":207},[1417],{"type":41,"value":929},{"type":36,"tag":178,"props":1419,"children":1420},{"style":207},[1421],{"type":41,"value":934},{"type":36,"tag":178,"props":1423,"children":1424},{"class":180,"line":358},[1425,1429,1433,1437,1442,1446],{"type":36,"tag":178,"props":1426,"children":1427},{"style":681},[1428],{"type":41,"value":942},{"type":36,"tag":178,"props":1430,"children":1431},{"style":207},[1432],{"type":41,"value":689},{"type":36,"tag":178,"props":1434,"children":1435},{"style":207},[1436],{"type":41,"value":951},{"type":36,"tag":178,"props":1438,"children":1439},{"style":347},[1440],{"type":41,"value":1441},"PATCH",{"type":36,"tag":178,"props":1443,"children":1444},{"style":207},[1445],{"type":41,"value":593},{"type":36,"tag":178,"props":1447,"children":1448},{"style":207},[1449],{"type":41,"value":965},{"type":36,"tag":178,"props":1451,"children":1452},{"class":180,"line":367},[1453,1457,1461,1465,1469,1473,1477,1481,1485,1489,1493,1497,1501,1505,1509,1513,1517,1521,1525,1529,1533],{"type":36,"tag":178,"props":1454,"children":1455},{"style":681},[1456],{"type":41,"value":973},{"type":36,"tag":178,"props":1458,"children":1459},{"style":207},[1460],{"type":41,"value":689},{"type":36,"tag":178,"props":1462,"children":1463},{"style":207},[1464],{"type":41,"value":982},{"type":36,"tag":178,"props":1466,"children":1467},{"style":207},[1468],{"type":41,"value":951},{"type":36,"tag":178,"props":1470,"children":1471},{"style":681},[1472],{"type":41,"value":991},{"type":36,"tag":178,"props":1474,"children":1475},{"style":207},[1476],{"type":41,"value":593},{"type":36,"tag":178,"props":1478,"children":1479},{"style":207},[1480],{"type":41,"value":689},{"type":36,"tag":178,"props":1482,"children":1483},{"style":201},[1484],{"type":41,"value":1004},{"type":36,"tag":178,"props":1486,"children":1487},{"style":207},[1488],{"type":41,"value":210},{"type":36,"tag":178,"props":1490,"children":1491},{"style":201},[1492],{"type":41,"value":1013},{"type":36,"tag":178,"props":1494,"children":1495},{"style":207},[1496],{"type":41,"value":210},{"type":36,"tag":178,"props":1498,"children":1499},{"style":201},[1500],{"type":41,"value":1022},{"type":36,"tag":178,"props":1502,"children":1503},{"style":207},[1504],{"type":41,"value":929},{"type":36,"tag":178,"props":1506,"children":1507},{"style":207},[1508],{"type":41,"value":951},{"type":36,"tag":178,"props":1510,"children":1511},{"style":681},[1512],{"type":41,"value":1035},{"type":36,"tag":178,"props":1514,"children":1515},{"style":207},[1516],{"type":41,"value":593},{"type":36,"tag":178,"props":1518,"children":1519},{"style":207},[1520],{"type":41,"value":689},{"type":36,"tag":178,"props":1522,"children":1523},{"style":207},[1524],{"type":41,"value":951},{"type":36,"tag":178,"props":1526,"children":1527},{"style":347},[1528],{"type":41,"value":1052},{"type":36,"tag":178,"props":1530,"children":1531},{"style":207},[1532],{"type":41,"value":593},{"type":36,"tag":178,"props":1534,"children":1535},{"style":207},[1536],{"type":41,"value":1061},{"type":36,"tag":178,"props":1538,"children":1539},{"class":180,"line":381},[1540,1544,1548,1553,1557,1562,1566,1570,1575,1579,1583,1588,1592,1597,1601],{"type":36,"tag":178,"props":1541,"children":1542},{"style":681},[1543],{"type":41,"value":1069},{"type":36,"tag":178,"props":1545,"children":1546},{"style":207},[1547],{"type":41,"value":689},{"type":36,"tag":178,"props":1549,"children":1550},{"style":201},[1551],{"type":41,"value":1552}," JSON",{"type":36,"tag":178,"props":1554,"children":1555},{"style":207},[1556],{"type":41,"value":210},{"type":36,"tag":178,"props":1558,"children":1559},{"style":213},[1560],{"type":41,"value":1561},"stringify",{"type":36,"tag":178,"props":1563,"children":1564},{"style":201},[1565],{"type":41,"value":588},{"type":36,"tag":178,"props":1567,"children":1568},{"style":207},[1569],{"type":41,"value":678},{"type":36,"tag":178,"props":1571,"children":1572},{"style":681},[1573],{"type":41,"value":1574}," action",{"type":36,"tag":178,"props":1576,"children":1577},{"style":207},[1578],{"type":41,"value":689},{"type":36,"tag":178,"props":1580,"children":1581},{"style":207},[1582],{"type":41,"value":951},{"type":36,"tag":178,"props":1584,"children":1585},{"style":347},[1586],{"type":41,"value":1587},"stop",{"type":36,"tag":178,"props":1589,"children":1590},{"style":207},[1591],{"type":41,"value":593},{"type":36,"tag":178,"props":1593,"children":1594},{"style":207},[1595],{"type":41,"value":1596}," }",{"type":36,"tag":178,"props":1598,"children":1599},{"style":201},[1600],{"type":41,"value":607},{"type":36,"tag":178,"props":1602,"children":1603},{"style":207},[1604],{"type":41,"value":965},{"type":36,"tag":178,"props":1606,"children":1607},{"class":180,"line":394},[1608,1612],{"type":36,"tag":178,"props":1609,"children":1610},{"style":207},[1611],{"type":41,"value":708},{"type":36,"tag":178,"props":1613,"children":1614},{"style":201},[1615],{"type":41,"value":713},{"type":36,"tag":37,"props":1617,"children":1618},{},[1619,1621,1626,1628,1634,1636,1644,1646,1652,1654,1660],{"type":41,"value":1620},"A cloud browser is a paid service and requires ",{"type":36,"tag":44,"props":1622,"children":1624},{"className":1623},[],[1625],{"type":41,"value":1022},{"type":41,"value":1627}," to be set in the environment.\nBrowser Use cloud browsers auto-solve captchas. When you land on one, just stop driving and ",{"type":36,"tag":44,"props":1629,"children":1631},{"className":1630},[],[1632],{"type":41,"value":1633},"await new Promise(r => setTimeout(r, 10000))",{"type":41,"value":1635},"; the solver runs server-side and the page advances on its own.\nBrowser Use has a free tier gated for intelligent and powerful agents. Unlimited free browsers and proxies, limited to 3 concurrent browsers. Agents can sign up and receive a key fully autonomously, but must pass a proof-of-agent-capability challenge. In can be done without any browser. To begin, post or webfetch ",{"type":36,"tag":1637,"props":1638,"children":1642},"a",{"href":1639,"rel":1640},"https:\u002F\u002Fbrowser-use.com",[1641],"nofollow",[1643],{"type":41,"value":1639},{"type":41,"value":1645}," and solve the challenge (see ",{"type":36,"tag":1637,"props":1647,"children":1650},{"href":1648,"rel":1649},"https:\u002F\u002Fbrowser-use.com\u002Fllms.txt",[1641],[1651],{"type":41,"value":1648},{"type":41,"value":1653}," or POST ",{"type":36,"tag":1637,"props":1655,"children":1658},{"href":1656,"rel":1657},"https:\u002F\u002Fapi.browser-use.com\u002Fcloud\u002Fsignup",[1641],[1659],{"type":41,"value":1656},{"type":41,"value":1661},".).",{"type":36,"tag":155,"props":1663,"children":1665},{"id":1664},"way-4-user-preconfigured-endpoint",[1666],{"type":41,"value":1667},"Way 4: user-preconfigured endpoint",{"type":36,"tag":37,"props":1669,"children":1670},{},[1671,1673,1679,1681,1687,1689,1695,1697,1702,1704,1710,1712,1717],{"type":41,"value":1672},"Not a method you choose — a way for the user to hand you a pre-set endpoint.\nWhen ",{"type":36,"tag":44,"props":1674,"children":1676},{"className":1675},[],[1677],{"type":41,"value":1678},"V4_RUN_ID",{"type":41,"value":1680}," and ",{"type":36,"tag":44,"props":1682,"children":1684},{"className":1683},[],[1685],{"type":41,"value":1686},"BU_CDP_WS",{"type":41,"value":1688}," (or its alias ",{"type":36,"tag":44,"props":1690,"children":1692},{"className":1691},[],[1693],{"type":41,"value":1694},"BU_CDP_URL",{"type":41,"value":1696},") are both set, ",{"type":36,"tag":44,"props":1698,"children":1700},{"className":1699},[],[1701],{"type":41,"value":49},{"type":41,"value":1703}," connects to that endpoint and attaches its existing non-internal page once before the first snippet. Go straight to driving it. Other environments keep the explicit connection flow, and explicit ",{"type":36,"tag":44,"props":1705,"children":1707},{"className":1706},[],[1708],{"type":41,"value":1709},"{ wsUrl }",{"type":41,"value":1711}," \u002F ",{"type":36,"tag":44,"props":1713,"children":1715},{"className":1714},[],[1716],{"type":41,"value":807},{"type":41,"value":1718}," calls still connect to the requested endpoint instead.\nIf that fixed endpoint closes or repeatedly fails its WebSocket upgrade, reconnecting to the same URL cannot recover it; the endpoint owner must replace it.",{"type":36,"tag":112,"props":1720,"children":1722},{"id":1721},"attaching-to-a-target",[1723],{"type":41,"value":1724},"Attaching to a target",{"type":36,"tag":37,"props":1726,"children":1727},{},[1728],{"type":41,"value":1729},"After connecting manually, attach to a page target before driving the browser. A preconfigured endpoint is already attached automatically:",{"type":36,"tag":167,"props":1731,"children":1733},{"className":169,"code":1732,"language":171,"meta":172,"style":172},"const targets = (await session.Target.getTargets({})).targetInfos\n\u002F\u002F Pick the first non-internal tab if none was specified.\nconst page = targets.find(t => t.type === \"page\" && !t.url.startsWith(\"chrome:\u002F\u002F\"))\nawait session.use(page.targetId)\n",[1734],{"type":36,"tag":44,"props":1735,"children":1736},{"__ignoreMap":172},[1737,1806,1814,1943],{"type":36,"tag":178,"props":1738,"children":1739},{"class":180,"line":181},[1740,1744,1749,1753,1758,1762,1766,1770,1775,1779,1784,1788,1792,1797,1801],{"type":36,"tag":178,"props":1741,"children":1742},{"style":561},[1743],{"type":41,"value":564},{"type":36,"tag":178,"props":1745,"children":1746},{"style":201},[1747],{"type":41,"value":1748}," targets ",{"type":36,"tag":178,"props":1750,"children":1751},{"style":207},[1752],{"type":41,"value":428},{"type":36,"tag":178,"props":1754,"children":1755},{"style":201},[1756],{"type":41,"value":1757}," (",{"type":36,"tag":178,"props":1759,"children":1760},{"style":195},[1761],{"type":41,"value":198},{"type":36,"tag":178,"props":1763,"children":1764},{"style":201},[1765],{"type":41,"value":204},{"type":36,"tag":178,"props":1767,"children":1768},{"style":207},[1769],{"type":41,"value":210},{"type":36,"tag":178,"props":1771,"children":1772},{"style":201},[1773],{"type":41,"value":1774},"Target",{"type":36,"tag":178,"props":1776,"children":1777},{"style":207},[1778],{"type":41,"value":210},{"type":36,"tag":178,"props":1780,"children":1781},{"style":213},[1782],{"type":41,"value":1783},"getTargets",{"type":36,"tag":178,"props":1785,"children":1786},{"style":201},[1787],{"type":41,"value":588},{"type":36,"tag":178,"props":1789,"children":1790},{"style":207},[1791],{"type":41,"value":1082},{"type":36,"tag":178,"props":1793,"children":1794},{"style":201},[1795],{"type":41,"value":1796},"))",{"type":36,"tag":178,"props":1798,"children":1799},{"style":207},[1800],{"type":41,"value":210},{"type":36,"tag":178,"props":1802,"children":1803},{"style":201},[1804],{"type":41,"value":1805},"targetInfos\n",{"type":36,"tag":178,"props":1807,"children":1808},{"class":180,"line":191},[1809],{"type":36,"tag":178,"props":1810,"children":1811},{"style":185},[1812],{"type":41,"value":1813},"\u002F\u002F Pick the first non-internal tab if none was specified.\n",{"type":36,"tag":178,"props":1815,"children":1816},{"class":180,"line":358},[1817,1821,1826,1830,1835,1839,1844,1848,1853,1857,1862,1866,1871,1876,1880,1885,1889,1894,1899,1903,1907,1912,1916,1921,1925,1929,1934,1938],{"type":36,"tag":178,"props":1818,"children":1819},{"style":561},[1820],{"type":41,"value":564},{"type":36,"tag":178,"props":1822,"children":1823},{"style":201},[1824],{"type":41,"value":1825}," page ",{"type":36,"tag":178,"props":1827,"children":1828},{"style":207},[1829],{"type":41,"value":428},{"type":36,"tag":178,"props":1831,"children":1832},{"style":201},[1833],{"type":41,"value":1834}," targets",{"type":36,"tag":178,"props":1836,"children":1837},{"style":207},[1838],{"type":41,"value":210},{"type":36,"tag":178,"props":1840,"children":1841},{"style":213},[1842],{"type":41,"value":1843},"find",{"type":36,"tag":178,"props":1845,"children":1846},{"style":201},[1847],{"type":41,"value":588},{"type":36,"tag":178,"props":1849,"children":1850},{"style":623},[1851],{"type":41,"value":1852},"t",{"type":36,"tag":178,"props":1854,"children":1855},{"style":561},[1856],{"type":41,"value":631},{"type":36,"tag":178,"props":1858,"children":1859},{"style":201},[1860],{"type":41,"value":1861}," t",{"type":36,"tag":178,"props":1863,"children":1864},{"style":207},[1865],{"type":41,"value":210},{"type":36,"tag":178,"props":1867,"children":1868},{"style":201},[1869],{"type":41,"value":1870},"type ",{"type":36,"tag":178,"props":1872,"children":1873},{"style":207},[1874],{"type":41,"value":1875},"===",{"type":36,"tag":178,"props":1877,"children":1878},{"style":207},[1879],{"type":41,"value":951},{"type":36,"tag":178,"props":1881,"children":1882},{"style":347},[1883],{"type":41,"value":1884},"page",{"type":36,"tag":178,"props":1886,"children":1887},{"style":207},[1888],{"type":41,"value":593},{"type":36,"tag":178,"props":1890,"children":1891},{"style":207},[1892],{"type":41,"value":1893}," &&",{"type":36,"tag":178,"props":1895,"children":1896},{"style":207},[1897],{"type":41,"value":1898}," !",{"type":36,"tag":178,"props":1900,"children":1901},{"style":201},[1902],{"type":41,"value":1852},{"type":36,"tag":178,"props":1904,"children":1905},{"style":207},[1906],{"type":41,"value":210},{"type":36,"tag":178,"props":1908,"children":1909},{"style":201},[1910],{"type":41,"value":1911},"url",{"type":36,"tag":178,"props":1913,"children":1914},{"style":207},[1915],{"type":41,"value":210},{"type":36,"tag":178,"props":1917,"children":1918},{"style":213},[1919],{"type":41,"value":1920},"startsWith",{"type":36,"tag":178,"props":1922,"children":1923},{"style":201},[1924],{"type":41,"value":588},{"type":36,"tag":178,"props":1926,"children":1927},{"style":207},[1928],{"type":41,"value":593},{"type":36,"tag":178,"props":1930,"children":1931},{"style":347},[1932],{"type":41,"value":1933},"chrome:\u002F\u002F",{"type":36,"tag":178,"props":1935,"children":1936},{"style":207},[1937],{"type":41,"value":593},{"type":36,"tag":178,"props":1939,"children":1940},{"style":201},[1941],{"type":41,"value":1942},"))\n",{"type":36,"tag":178,"props":1944,"children":1945},{"class":180,"line":367},[1946,1950,1954,1958,1963,1968,1972],{"type":36,"tag":178,"props":1947,"children":1948},{"style":195},[1949],{"type":41,"value":198},{"type":36,"tag":178,"props":1951,"children":1952},{"style":201},[1953],{"type":41,"value":204},{"type":36,"tag":178,"props":1955,"children":1956},{"style":207},[1957],{"type":41,"value":210},{"type":36,"tag":178,"props":1959,"children":1960},{"style":213},[1961],{"type":41,"value":1962},"use",{"type":36,"tag":178,"props":1964,"children":1965},{"style":201},[1966],{"type":41,"value":1967},"(page",{"type":36,"tag":178,"props":1969,"children":1970},{"style":207},[1971],{"type":41,"value":210},{"type":36,"tag":178,"props":1973,"children":1974},{"style":201},[1975],{"type":41,"value":1976},"targetId)\n",{"type":36,"tag":37,"props":1978,"children":1979},{},[1980,1982,1988,1990,1996,1997,2003,2005,2011,2013,2018],{"type":41,"value":1981},"If a target-scoped command throws ",{"type":36,"tag":44,"props":1983,"children":1985},{"className":1984},[],[1986],{"type":41,"value":1987},"CdpError",{"type":41,"value":1989}," code ",{"type":36,"tag":44,"props":1991,"children":1993},{"className":1992},[],[1994],{"type":41,"value":1995},"-32001",{"type":41,"value":1757},{"type":36,"tag":44,"props":1998,"children":2000},{"className":1999},[],[2001],{"type":41,"value":2002},"Session with given id not found",{"type":41,"value":2004},"), the browser connection is still usable but the target session is stale. List targets again, ",{"type":36,"tag":44,"props":2006,"children":2008},{"className":2007},[],[2009],{"type":41,"value":2010},"session.use(...)",{"type":41,"value":2012}," the intended page, and retry the rejected command once. Calling ",{"type":36,"tag":44,"props":2014,"children":2016},{"className":2015},[],[2017],{"type":41,"value":135},{"type":41,"value":2019}," without arguments is a no-op while connected; it does not replace a stale target session.",{"type":36,"tag":37,"props":2021,"children":2022},{},[2023,2025,2030],{"type":41,"value":2024},"Every explicit reconnect or browser switch retires the previous socket and clears its active target attachment. Re-list targets, call ",{"type":36,"tag":44,"props":2026,"children":2028},{"className":2027},[],[2029],{"type":41,"value":2010},{"type":41,"value":2031},", and rediscover DOM nodes and Runtime objects before continuing.",{"type":36,"tag":112,"props":2033,"children":2035},{"id":2034},"driving-a-page",[2036],{"type":41,"value":2037},"Driving a page",{"type":36,"tag":37,"props":2039,"children":2040},{},[2041,2043,2049,2051,2057,2059,2065,2067,2073,2075,2080,2082,2087,2089,2095],{"type":41,"value":2042},"Domain methods follow ",{"type":36,"tag":44,"props":2044,"children":2046},{"className":2045},[],[2047],{"type":41,"value":2048},"session.\u003CDomain>.\u003Cmethod>(params)",{"type":41,"value":2050}," and return Promises.\nThe full surface (652 commands) is the Chrome DevTools Protocol.\n",{"type":36,"tag":44,"props":2052,"children":2054},{"className":2053},[],[2055],{"type":41,"value":2056},"Object.keys(session.domains).sort()",{"type":41,"value":2058}," lists every CDP domain bound on the session; ",{"type":36,"tag":44,"props":2060,"children":2062},{"className":2061},[],[2063],{"type":41,"value":2064},"Object.keys(session.Page).sort()",{"type":41,"value":2066}," lists the methods for ",{"type":36,"tag":44,"props":2068,"children":2070},{"className":2069},[],[2071],{"type":41,"value":2072},"Page",{"type":41,"value":2074},".\nFor unknown param shapes, call with ",{"type":36,"tag":44,"props":2076,"children":2078},{"className":2077},[],[2079],{"type":41,"value":1082},{"type":41,"value":2081}," and inspect the thrown ",{"type":36,"tag":44,"props":2083,"children":2085},{"className":2084},[],[2086],{"type":41,"value":1987},{"type":41,"value":2088}," — ",{"type":36,"tag":44,"props":2090,"children":2092},{"className":2091},[],[2093],{"type":41,"value":2094},".data",{"type":41,"value":2096}," carries the missing-field detail.",{"type":36,"tag":37,"props":2098,"children":2099},{},[2100],{"type":41,"value":2101},"Common moves:",{"type":36,"tag":167,"props":2103,"children":2105},{"className":169,"code":2104,"language":171,"meta":172,"style":172},"\u002F\u002F Navigate. Register the load waiter BEFORE navigate so a fast load isn't missed.\nawait session.Page.enable()\nconst loaded = session.waitFor(\"Page.loadEventFired\", { timeoutMs: 15_000 })\nawait session.Page.navigate({ url: \"https:\u002F\u002Fexample.com\" })\nawait loaded\n\u002F\u002F Page.navigate resolves even on network errors — its result carries `errorText` when the load failed.\n\n\u002F\u002F Evaluate JS in the page.\nconst r = await session.Runtime.evaluate({\n  expression: \"document.title\",\n  returnByValue: true,\n})\nconsole.log(r.result.value)\n\n\u002F\u002F Click by coordinates.\nconst x = 200, y = 300\nawait session.Input.dispatchMouseEvent({ type: \"mouseMoved\", x, y })\nawait session.Input.dispatchMouseEvent({ type: \"mousePressed\", x, y, button: \"left\", clickCount: 1 })\nawait session.Input.dispatchMouseEvent({ type: \"mouseReleased\", x, y, button: \"left\", clickCount: 1 })\n\n\u002F\u002F Type text.\nawait session.Input.insertText({ text: \"hello\" })\n\n\u002F\u002F Screenshot.\nawait session.Page.captureScreenshot({ format: \"png\" })\n\u002F\u002F You see the image inline on the next turn — `browser_execute` automatically\n\u002F\u002F attaches every `Page.captureScreenshot` result. No need to decode, save, or\n\u002F\u002F `read` the bytes back. The base64 is still in `data` (via the return value)\n\u002F\u002F for the rare case you want to process it programmatically.\n",[2106],{"type":36,"tag":44,"props":2107,"children":2108},{"__ignoreMap":172},[2109,2117,2149,2226,2292,2304,2312,2321,2329,2379,2408,2430,2442,2481,2489,2498,2538,2623,2749,2870,2878,2887,2954,2962,2971,3038,3047,3056,3065],{"type":36,"tag":178,"props":2110,"children":2111},{"class":180,"line":181},[2112],{"type":36,"tag":178,"props":2113,"children":2114},{"style":185},[2115],{"type":41,"value":2116},"\u002F\u002F Navigate. Register the load waiter BEFORE navigate so a fast load isn't missed.\n",{"type":36,"tag":178,"props":2118,"children":2119},{"class":180,"line":191},[2120,2124,2128,2132,2136,2140,2145],{"type":36,"tag":178,"props":2121,"children":2122},{"style":195},[2123],{"type":41,"value":198},{"type":36,"tag":178,"props":2125,"children":2126},{"style":201},[2127],{"type":41,"value":204},{"type":36,"tag":178,"props":2129,"children":2130},{"style":207},[2131],{"type":41,"value":210},{"type":36,"tag":178,"props":2133,"children":2134},{"style":201},[2135],{"type":41,"value":2072},{"type":36,"tag":178,"props":2137,"children":2138},{"style":207},[2139],{"type":41,"value":210},{"type":36,"tag":178,"props":2141,"children":2142},{"style":213},[2143],{"type":41,"value":2144},"enable",{"type":36,"tag":178,"props":2146,"children":2147},{"style":201},[2148],{"type":41,"value":221},{"type":36,"tag":178,"props":2150,"children":2151},{"class":180,"line":358},[2152,2156,2161,2165,2169,2173,2178,2182,2186,2191,2195,2199,2203,2208,2212,2218,2222],{"type":36,"tag":178,"props":2153,"children":2154},{"style":561},[2155],{"type":41,"value":564},{"type":36,"tag":178,"props":2157,"children":2158},{"style":201},[2159],{"type":41,"value":2160}," loaded ",{"type":36,"tag":178,"props":2162,"children":2163},{"style":207},[2164],{"type":41,"value":428},{"type":36,"tag":178,"props":2166,"children":2167},{"style":201},[2168],{"type":41,"value":204},{"type":36,"tag":178,"props":2170,"children":2171},{"style":207},[2172],{"type":41,"value":210},{"type":36,"tag":178,"props":2174,"children":2175},{"style":213},[2176],{"type":41,"value":2177},"waitFor",{"type":36,"tag":178,"props":2179,"children":2180},{"style":201},[2181],{"type":41,"value":588},{"type":36,"tag":178,"props":2183,"children":2184},{"style":207},[2185],{"type":41,"value":593},{"type":36,"tag":178,"props":2187,"children":2188},{"style":347},[2189],{"type":41,"value":2190},"Page.loadEventFired",{"type":36,"tag":178,"props":2192,"children":2193},{"style":207},[2194],{"type":41,"value":593},{"type":36,"tag":178,"props":2196,"children":2197},{"style":207},[2198],{"type":41,"value":929},{"type":36,"tag":178,"props":2200,"children":2201},{"style":207},[2202],{"type":41,"value":982},{"type":36,"tag":178,"props":2204,"children":2205},{"style":681},[2206],{"type":41,"value":2207}," timeoutMs",{"type":36,"tag":178,"props":2209,"children":2210},{"style":207},[2211],{"type":41,"value":689},{"type":36,"tag":178,"props":2213,"children":2215},{"style":2214},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2216],{"type":41,"value":2217}," 15_000",{"type":36,"tag":178,"props":2219,"children":2220},{"style":207},[2221],{"type":41,"value":1596},{"type":36,"tag":178,"props":2223,"children":2224},{"style":201},[2225],{"type":41,"value":713},{"type":36,"tag":178,"props":2227,"children":2228},{"class":180,"line":367},[2229,2233,2237,2241,2245,2249,2254,2258,2262,2267,2271,2275,2280,2284,2288],{"type":36,"tag":178,"props":2230,"children":2231},{"style":195},[2232],{"type":41,"value":198},{"type":36,"tag":178,"props":2234,"children":2235},{"style":201},[2236],{"type":41,"value":204},{"type":36,"tag":178,"props":2238,"children":2239},{"style":207},[2240],{"type":41,"value":210},{"type":36,"tag":178,"props":2242,"children":2243},{"style":201},[2244],{"type":41,"value":2072},{"type":36,"tag":178,"props":2246,"children":2247},{"style":207},[2248],{"type":41,"value":210},{"type":36,"tag":178,"props":2250,"children":2251},{"style":213},[2252],{"type":41,"value":2253},"navigate",{"type":36,"tag":178,"props":2255,"children":2256},{"style":201},[2257],{"type":41,"value":588},{"type":36,"tag":178,"props":2259,"children":2260},{"style":207},[2261],{"type":41,"value":678},{"type":36,"tag":178,"props":2263,"children":2264},{"style":681},[2265],{"type":41,"value":2266}," url",{"type":36,"tag":178,"props":2268,"children":2269},{"style":207},[2270],{"type":41,"value":689},{"type":36,"tag":178,"props":2272,"children":2273},{"style":207},[2274],{"type":41,"value":951},{"type":36,"tag":178,"props":2276,"children":2277},{"style":347},[2278],{"type":41,"value":2279},"https:\u002F\u002Fexample.com",{"type":36,"tag":178,"props":2281,"children":2282},{"style":207},[2283],{"type":41,"value":593},{"type":36,"tag":178,"props":2285,"children":2286},{"style":207},[2287],{"type":41,"value":1596},{"type":36,"tag":178,"props":2289,"children":2290},{"style":201},[2291],{"type":41,"value":713},{"type":36,"tag":178,"props":2293,"children":2294},{"class":180,"line":381},[2295,2299],{"type":36,"tag":178,"props":2296,"children":2297},{"style":195},[2298],{"type":41,"value":198},{"type":36,"tag":178,"props":2300,"children":2301},{"style":201},[2302],{"type":41,"value":2303}," loaded\n",{"type":36,"tag":178,"props":2305,"children":2306},{"class":180,"line":394},[2307],{"type":36,"tag":178,"props":2308,"children":2309},{"style":185},[2310],{"type":41,"value":2311},"\u002F\u002F Page.navigate resolves even on network errors — its result carries `errorText` when the load failed.\n",{"type":36,"tag":178,"props":2313,"children":2314},{"class":180,"line":403},[2315],{"type":36,"tag":178,"props":2316,"children":2318},{"emptyLinePlaceholder":2317},true,[2319],{"type":41,"value":2320},"\n",{"type":36,"tag":178,"props":2322,"children":2323},{"class":180,"line":417},[2324],{"type":36,"tag":178,"props":2325,"children":2326},{"style":185},[2327],{"type":41,"value":2328},"\u002F\u002F Evaluate JS in the page.\n",{"type":36,"tag":178,"props":2330,"children":2331},{"class":180,"line":469},[2332,2336,2340,2344,2348,2352,2356,2361,2365,2370,2374],{"type":36,"tag":178,"props":2333,"children":2334},{"style":561},[2335],{"type":41,"value":564},{"type":36,"tag":178,"props":2337,"children":2338},{"style":201},[2339],{"type":41,"value":895},{"type":36,"tag":178,"props":2341,"children":2342},{"style":207},[2343],{"type":41,"value":428},{"type":36,"tag":178,"props":2345,"children":2346},{"style":195},[2347],{"type":41,"value":578},{"type":36,"tag":178,"props":2349,"children":2350},{"style":201},[2351],{"type":41,"value":204},{"type":36,"tag":178,"props":2353,"children":2354},{"style":207},[2355],{"type":41,"value":210},{"type":36,"tag":178,"props":2357,"children":2358},{"style":201},[2359],{"type":41,"value":2360},"Runtime",{"type":36,"tag":178,"props":2362,"children":2363},{"style":207},[2364],{"type":41,"value":210},{"type":36,"tag":178,"props":2366,"children":2367},{"style":213},[2368],{"type":41,"value":2369},"evaluate",{"type":36,"tag":178,"props":2371,"children":2372},{"style":201},[2373],{"type":41,"value":588},{"type":36,"tag":178,"props":2375,"children":2376},{"style":207},[2377],{"type":41,"value":2378},"{\n",{"type":36,"tag":178,"props":2380,"children":2381},{"class":180,"line":478},[2382,2387,2391,2395,2400,2404],{"type":36,"tag":178,"props":2383,"children":2384},{"style":681},[2385],{"type":41,"value":2386},"  expression",{"type":36,"tag":178,"props":2388,"children":2389},{"style":207},[2390],{"type":41,"value":689},{"type":36,"tag":178,"props":2392,"children":2393},{"style":207},[2394],{"type":41,"value":951},{"type":36,"tag":178,"props":2396,"children":2397},{"style":347},[2398],{"type":41,"value":2399},"document.title",{"type":36,"tag":178,"props":2401,"children":2402},{"style":207},[2403],{"type":41,"value":593},{"type":36,"tag":178,"props":2405,"children":2406},{"style":207},[2407],{"type":41,"value":965},{"type":36,"tag":178,"props":2409,"children":2410},{"class":180,"line":497},[2411,2416,2420,2426],{"type":36,"tag":178,"props":2412,"children":2413},{"style":681},[2414],{"type":41,"value":2415},"  returnByValue",{"type":36,"tag":178,"props":2417,"children":2418},{"style":207},[2419],{"type":41,"value":689},{"type":36,"tag":178,"props":2421,"children":2423},{"style":2422},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[2424],{"type":41,"value":2425}," true",{"type":36,"tag":178,"props":2427,"children":2428},{"style":207},[2429],{"type":41,"value":965},{"type":36,"tag":178,"props":2431,"children":2433},{"class":180,"line":2432},12,[2434,2438],{"type":36,"tag":178,"props":2435,"children":2436},{"style":207},[2437],{"type":41,"value":708},{"type":36,"tag":178,"props":2439,"children":2440},{"style":201},[2441],{"type":41,"value":713},{"type":36,"tag":178,"props":2443,"children":2445},{"class":180,"line":2444},13,[2446,2450,2454,2458,2463,2467,2472,2476],{"type":36,"tag":178,"props":2447,"children":2448},{"style":201},[2449],{"type":41,"value":87},{"type":36,"tag":178,"props":2451,"children":2452},{"style":207},[2453],{"type":41,"value":210},{"type":36,"tag":178,"props":2455,"children":2456},{"style":213},[2457],{"type":41,"value":1333},{"type":36,"tag":178,"props":2459,"children":2460},{"style":201},[2461],{"type":41,"value":2462},"(r",{"type":36,"tag":178,"props":2464,"children":2465},{"style":207},[2466],{"type":41,"value":210},{"type":36,"tag":178,"props":2468,"children":2469},{"style":201},[2470],{"type":41,"value":2471},"result",{"type":36,"tag":178,"props":2473,"children":2474},{"style":207},[2475],{"type":41,"value":210},{"type":36,"tag":178,"props":2477,"children":2478},{"style":201},[2479],{"type":41,"value":2480},"value)\n",{"type":36,"tag":178,"props":2482,"children":2484},{"class":180,"line":2483},14,[2485],{"type":36,"tag":178,"props":2486,"children":2487},{"emptyLinePlaceholder":2317},[2488],{"type":41,"value":2320},{"type":36,"tag":178,"props":2490,"children":2492},{"class":180,"line":2491},15,[2493],{"type":36,"tag":178,"props":2494,"children":2495},{"style":185},[2496],{"type":41,"value":2497},"\u002F\u002F Click by coordinates.\n",{"type":36,"tag":178,"props":2499,"children":2501},{"class":180,"line":2500},16,[2502,2506,2511,2515,2520,2524,2529,2533],{"type":36,"tag":178,"props":2503,"children":2504},{"style":561},[2505],{"type":41,"value":564},{"type":36,"tag":178,"props":2507,"children":2508},{"style":201},[2509],{"type":41,"value":2510}," x ",{"type":36,"tag":178,"props":2512,"children":2513},{"style":207},[2514],{"type":41,"value":428},{"type":36,"tag":178,"props":2516,"children":2517},{"style":2214},[2518],{"type":41,"value":2519}," 200",{"type":36,"tag":178,"props":2521,"children":2522},{"style":207},[2523],{"type":41,"value":929},{"type":36,"tag":178,"props":2525,"children":2526},{"style":201},[2527],{"type":41,"value":2528}," y ",{"type":36,"tag":178,"props":2530,"children":2531},{"style":207},[2532],{"type":41,"value":428},{"type":36,"tag":178,"props":2534,"children":2535},{"style":2214},[2536],{"type":41,"value":2537}," 300\n",{"type":36,"tag":178,"props":2539,"children":2541},{"class":180,"line":2540},17,[2542,2546,2550,2554,2559,2563,2568,2572,2576,2581,2585,2589,2594,2598,2602,2607,2611,2615,2619],{"type":36,"tag":178,"props":2543,"children":2544},{"style":195},[2545],{"type":41,"value":198},{"type":36,"tag":178,"props":2547,"children":2548},{"style":201},[2549],{"type":41,"value":204},{"type":36,"tag":178,"props":2551,"children":2552},{"style":207},[2553],{"type":41,"value":210},{"type":36,"tag":178,"props":2555,"children":2556},{"style":201},[2557],{"type":41,"value":2558},"Input",{"type":36,"tag":178,"props":2560,"children":2561},{"style":207},[2562],{"type":41,"value":210},{"type":36,"tag":178,"props":2564,"children":2565},{"style":213},[2566],{"type":41,"value":2567},"dispatchMouseEvent",{"type":36,"tag":178,"props":2569,"children":2570},{"style":201},[2571],{"type":41,"value":588},{"type":36,"tag":178,"props":2573,"children":2574},{"style":207},[2575],{"type":41,"value":678},{"type":36,"tag":178,"props":2577,"children":2578},{"style":681},[2579],{"type":41,"value":2580}," type",{"type":36,"tag":178,"props":2582,"children":2583},{"style":207},[2584],{"type":41,"value":689},{"type":36,"tag":178,"props":2586,"children":2587},{"style":207},[2588],{"type":41,"value":951},{"type":36,"tag":178,"props":2590,"children":2591},{"style":347},[2592],{"type":41,"value":2593},"mouseMoved",{"type":36,"tag":178,"props":2595,"children":2596},{"style":207},[2597],{"type":41,"value":593},{"type":36,"tag":178,"props":2599,"children":2600},{"style":207},[2601],{"type":41,"value":929},{"type":36,"tag":178,"props":2603,"children":2604},{"style":201},[2605],{"type":41,"value":2606}," x",{"type":36,"tag":178,"props":2608,"children":2609},{"style":207},[2610],{"type":41,"value":929},{"type":36,"tag":178,"props":2612,"children":2613},{"style":201},[2614],{"type":41,"value":2528},{"type":36,"tag":178,"props":2616,"children":2617},{"style":207},[2618],{"type":41,"value":708},{"type":36,"tag":178,"props":2620,"children":2621},{"style":201},[2622],{"type":41,"value":713},{"type":36,"tag":178,"props":2624,"children":2626},{"class":180,"line":2625},18,[2627,2631,2635,2639,2643,2647,2651,2655,2659,2663,2667,2671,2676,2680,2684,2688,2692,2697,2701,2706,2710,2714,2719,2723,2727,2732,2736,2741,2745],{"type":36,"tag":178,"props":2628,"children":2629},{"style":195},[2630],{"type":41,"value":198},{"type":36,"tag":178,"props":2632,"children":2633},{"style":201},[2634],{"type":41,"value":204},{"type":36,"tag":178,"props":2636,"children":2637},{"style":207},[2638],{"type":41,"value":210},{"type":36,"tag":178,"props":2640,"children":2641},{"style":201},[2642],{"type":41,"value":2558},{"type":36,"tag":178,"props":2644,"children":2645},{"style":207},[2646],{"type":41,"value":210},{"type":36,"tag":178,"props":2648,"children":2649},{"style":213},[2650],{"type":41,"value":2567},{"type":36,"tag":178,"props":2652,"children":2653},{"style":201},[2654],{"type":41,"value":588},{"type":36,"tag":178,"props":2656,"children":2657},{"style":207},[2658],{"type":41,"value":678},{"type":36,"tag":178,"props":2660,"children":2661},{"style":681},[2662],{"type":41,"value":2580},{"type":36,"tag":178,"props":2664,"children":2665},{"style":207},[2666],{"type":41,"value":689},{"type":36,"tag":178,"props":2668,"children":2669},{"style":207},[2670],{"type":41,"value":951},{"type":36,"tag":178,"props":2672,"children":2673},{"style":347},[2674],{"type":41,"value":2675},"mousePressed",{"type":36,"tag":178,"props":2677,"children":2678},{"style":207},[2679],{"type":41,"value":593},{"type":36,"tag":178,"props":2681,"children":2682},{"style":207},[2683],{"type":41,"value":929},{"type":36,"tag":178,"props":2685,"children":2686},{"style":201},[2687],{"type":41,"value":2606},{"type":36,"tag":178,"props":2689,"children":2690},{"style":207},[2691],{"type":41,"value":929},{"type":36,"tag":178,"props":2693,"children":2694},{"style":201},[2695],{"type":41,"value":2696}," y",{"type":36,"tag":178,"props":2698,"children":2699},{"style":207},[2700],{"type":41,"value":929},{"type":36,"tag":178,"props":2702,"children":2703},{"style":681},[2704],{"type":41,"value":2705}," button",{"type":36,"tag":178,"props":2707,"children":2708},{"style":207},[2709],{"type":41,"value":689},{"type":36,"tag":178,"props":2711,"children":2712},{"style":207},[2713],{"type":41,"value":951},{"type":36,"tag":178,"props":2715,"children":2716},{"style":347},[2717],{"type":41,"value":2718},"left",{"type":36,"tag":178,"props":2720,"children":2721},{"style":207},[2722],{"type":41,"value":593},{"type":36,"tag":178,"props":2724,"children":2725},{"style":207},[2726],{"type":41,"value":929},{"type":36,"tag":178,"props":2728,"children":2729},{"style":681},[2730],{"type":41,"value":2731}," clickCount",{"type":36,"tag":178,"props":2733,"children":2734},{"style":207},[2735],{"type":41,"value":689},{"type":36,"tag":178,"props":2737,"children":2738},{"style":2214},[2739],{"type":41,"value":2740}," 1",{"type":36,"tag":178,"props":2742,"children":2743},{"style":207},[2744],{"type":41,"value":1596},{"type":36,"tag":178,"props":2746,"children":2747},{"style":201},[2748],{"type":41,"value":713},{"type":36,"tag":178,"props":2750,"children":2752},{"class":180,"line":2751},19,[2753,2757,2761,2765,2769,2773,2777,2781,2785,2789,2793,2797,2802,2806,2810,2814,2818,2822,2826,2830,2834,2838,2842,2846,2850,2854,2858,2862,2866],{"type":36,"tag":178,"props":2754,"children":2755},{"style":195},[2756],{"type":41,"value":198},{"type":36,"tag":178,"props":2758,"children":2759},{"style":201},[2760],{"type":41,"value":204},{"type":36,"tag":178,"props":2762,"children":2763},{"style":207},[2764],{"type":41,"value":210},{"type":36,"tag":178,"props":2766,"children":2767},{"style":201},[2768],{"type":41,"value":2558},{"type":36,"tag":178,"props":2770,"children":2771},{"style":207},[2772],{"type":41,"value":210},{"type":36,"tag":178,"props":2774,"children":2775},{"style":213},[2776],{"type":41,"value":2567},{"type":36,"tag":178,"props":2778,"children":2779},{"style":201},[2780],{"type":41,"value":588},{"type":36,"tag":178,"props":2782,"children":2783},{"style":207},[2784],{"type":41,"value":678},{"type":36,"tag":178,"props":2786,"children":2787},{"style":681},[2788],{"type":41,"value":2580},{"type":36,"tag":178,"props":2790,"children":2791},{"style":207},[2792],{"type":41,"value":689},{"type":36,"tag":178,"props":2794,"children":2795},{"style":207},[2796],{"type":41,"value":951},{"type":36,"tag":178,"props":2798,"children":2799},{"style":347},[2800],{"type":41,"value":2801},"mouseReleased",{"type":36,"tag":178,"props":2803,"children":2804},{"style":207},[2805],{"type":41,"value":593},{"type":36,"tag":178,"props":2807,"children":2808},{"style":207},[2809],{"type":41,"value":929},{"type":36,"tag":178,"props":2811,"children":2812},{"style":201},[2813],{"type":41,"value":2606},{"type":36,"tag":178,"props":2815,"children":2816},{"style":207},[2817],{"type":41,"value":929},{"type":36,"tag":178,"props":2819,"children":2820},{"style":201},[2821],{"type":41,"value":2696},{"type":36,"tag":178,"props":2823,"children":2824},{"style":207},[2825],{"type":41,"value":929},{"type":36,"tag":178,"props":2827,"children":2828},{"style":681},[2829],{"type":41,"value":2705},{"type":36,"tag":178,"props":2831,"children":2832},{"style":207},[2833],{"type":41,"value":689},{"type":36,"tag":178,"props":2835,"children":2836},{"style":207},[2837],{"type":41,"value":951},{"type":36,"tag":178,"props":2839,"children":2840},{"style":347},[2841],{"type":41,"value":2718},{"type":36,"tag":178,"props":2843,"children":2844},{"style":207},[2845],{"type":41,"value":593},{"type":36,"tag":178,"props":2847,"children":2848},{"style":207},[2849],{"type":41,"value":929},{"type":36,"tag":178,"props":2851,"children":2852},{"style":681},[2853],{"type":41,"value":2731},{"type":36,"tag":178,"props":2855,"children":2856},{"style":207},[2857],{"type":41,"value":689},{"type":36,"tag":178,"props":2859,"children":2860},{"style":2214},[2861],{"type":41,"value":2740},{"type":36,"tag":178,"props":2863,"children":2864},{"style":207},[2865],{"type":41,"value":1596},{"type":36,"tag":178,"props":2867,"children":2868},{"style":201},[2869],{"type":41,"value":713},{"type":36,"tag":178,"props":2871,"children":2873},{"class":180,"line":2872},20,[2874],{"type":36,"tag":178,"props":2875,"children":2876},{"emptyLinePlaceholder":2317},[2877],{"type":41,"value":2320},{"type":36,"tag":178,"props":2879,"children":2881},{"class":180,"line":2880},21,[2882],{"type":36,"tag":178,"props":2883,"children":2884},{"style":185},[2885],{"type":41,"value":2886},"\u002F\u002F Type text.\n",{"type":36,"tag":178,"props":2888,"children":2890},{"class":180,"line":2889},22,[2891,2895,2899,2903,2907,2911,2916,2920,2924,2929,2933,2937,2942,2946,2950],{"type":36,"tag":178,"props":2892,"children":2893},{"style":195},[2894],{"type":41,"value":198},{"type":36,"tag":178,"props":2896,"children":2897},{"style":201},[2898],{"type":41,"value":204},{"type":36,"tag":178,"props":2900,"children":2901},{"style":207},[2902],{"type":41,"value":210},{"type":36,"tag":178,"props":2904,"children":2905},{"style":201},[2906],{"type":41,"value":2558},{"type":36,"tag":178,"props":2908,"children":2909},{"style":207},[2910],{"type":41,"value":210},{"type":36,"tag":178,"props":2912,"children":2913},{"style":213},[2914],{"type":41,"value":2915},"insertText",{"type":36,"tag":178,"props":2917,"children":2918},{"style":201},[2919],{"type":41,"value":588},{"type":36,"tag":178,"props":2921,"children":2922},{"style":207},[2923],{"type":41,"value":678},{"type":36,"tag":178,"props":2925,"children":2926},{"style":681},[2927],{"type":41,"value":2928}," text",{"type":36,"tag":178,"props":2930,"children":2931},{"style":207},[2932],{"type":41,"value":689},{"type":36,"tag":178,"props":2934,"children":2935},{"style":207},[2936],{"type":41,"value":951},{"type":36,"tag":178,"props":2938,"children":2939},{"style":347},[2940],{"type":41,"value":2941},"hello",{"type":36,"tag":178,"props":2943,"children":2944},{"style":207},[2945],{"type":41,"value":593},{"type":36,"tag":178,"props":2947,"children":2948},{"style":207},[2949],{"type":41,"value":1596},{"type":36,"tag":178,"props":2951,"children":2952},{"style":201},[2953],{"type":41,"value":713},{"type":36,"tag":178,"props":2955,"children":2957},{"class":180,"line":2956},23,[2958],{"type":36,"tag":178,"props":2959,"children":2960},{"emptyLinePlaceholder":2317},[2961],{"type":41,"value":2320},{"type":36,"tag":178,"props":2963,"children":2965},{"class":180,"line":2964},24,[2966],{"type":36,"tag":178,"props":2967,"children":2968},{"style":185},[2969],{"type":41,"value":2970},"\u002F\u002F Screenshot.\n",{"type":36,"tag":178,"props":2972,"children":2974},{"class":180,"line":2973},25,[2975,2979,2983,2987,2991,2995,3000,3004,3008,3013,3017,3021,3026,3030,3034],{"type":36,"tag":178,"props":2976,"children":2977},{"style":195},[2978],{"type":41,"value":198},{"type":36,"tag":178,"props":2980,"children":2981},{"style":201},[2982],{"type":41,"value":204},{"type":36,"tag":178,"props":2984,"children":2985},{"style":207},[2986],{"type":41,"value":210},{"type":36,"tag":178,"props":2988,"children":2989},{"style":201},[2990],{"type":41,"value":2072},{"type":36,"tag":178,"props":2992,"children":2993},{"style":207},[2994],{"type":41,"value":210},{"type":36,"tag":178,"props":2996,"children":2997},{"style":213},[2998],{"type":41,"value":2999},"captureScreenshot",{"type":36,"tag":178,"props":3001,"children":3002},{"style":201},[3003],{"type":41,"value":588},{"type":36,"tag":178,"props":3005,"children":3006},{"style":207},[3007],{"type":41,"value":678},{"type":36,"tag":178,"props":3009,"children":3010},{"style":681},[3011],{"type":41,"value":3012}," format",{"type":36,"tag":178,"props":3014,"children":3015},{"style":207},[3016],{"type":41,"value":689},{"type":36,"tag":178,"props":3018,"children":3019},{"style":207},[3020],{"type":41,"value":951},{"type":36,"tag":178,"props":3022,"children":3023},{"style":347},[3024],{"type":41,"value":3025},"png",{"type":36,"tag":178,"props":3027,"children":3028},{"style":207},[3029],{"type":41,"value":593},{"type":36,"tag":178,"props":3031,"children":3032},{"style":207},[3033],{"type":41,"value":1596},{"type":36,"tag":178,"props":3035,"children":3036},{"style":201},[3037],{"type":41,"value":713},{"type":36,"tag":178,"props":3039,"children":3041},{"class":180,"line":3040},26,[3042],{"type":36,"tag":178,"props":3043,"children":3044},{"style":185},[3045],{"type":41,"value":3046},"\u002F\u002F You see the image inline on the next turn — `browser_execute` automatically\n",{"type":36,"tag":178,"props":3048,"children":3050},{"class":180,"line":3049},27,[3051],{"type":36,"tag":178,"props":3052,"children":3053},{"style":185},[3054],{"type":41,"value":3055},"\u002F\u002F attaches every `Page.captureScreenshot` result. No need to decode, save, or\n",{"type":36,"tag":178,"props":3057,"children":3059},{"class":180,"line":3058},28,[3060],{"type":36,"tag":178,"props":3061,"children":3062},{"style":185},[3063],{"type":41,"value":3064},"\u002F\u002F `read` the bytes back. The base64 is still in `data` (via the return value)\n",{"type":36,"tag":178,"props":3066,"children":3068},{"class":180,"line":3067},29,[3069],{"type":36,"tag":178,"props":3070,"children":3071},{"style":185},[3072],{"type":41,"value":3073},"\u002F\u002F for the rare case you want to process it programmatically.\n",{"type":36,"tag":37,"props":3075,"children":3076},{},[3077,3083,3085,3091,3093,3099],{"type":36,"tag":44,"props":3078,"children":3080},{"className":3079},[],[3081],{"type":41,"value":3082},"Page.navigate",{"type":41,"value":3084}," can return a non-empty ",{"type":36,"tag":44,"props":3086,"children":3088},{"className":3087},[],[3089],{"type":41,"value":3090},"errorText",{"type":41,"value":3092}," instead of throwing. Treat it as a failed navigation. If ",{"type":36,"tag":44,"props":3094,"children":3096},{"className":3095},[],[3097],{"type":41,"value":3098},"ERR_TUNNEL_CONNECTION_FAILED",{"type":41,"value":3100}," persists, reloading, reattaching, or reconnecting to the same endpoint cannot change its proxy route; use another source or replace the cloud browser instead of retrying it.",{"type":36,"tag":37,"props":3102,"children":3103},{},[3104,3106,3112],{"type":41,"value":3105},"Not auto-attaching a screenshot: attachment is keyed on the ",{"type":36,"tag":44,"props":3107,"children":3109},{"className":3108},[],[3110],{"type":41,"value":3111},"Page.captureScreenshot",{"type":41,"value":3113}," response; pixels that arrive as an event are never attached.",{"type":36,"tag":167,"props":3115,"children":3117},{"className":169,"code":3116,"language":171,"meta":172,"style":172},"await session.Page.enable()\n\u002F\u002F Optional: screencast has no `clip`, so override the viewport for exact frame size.\nawait session.Emulation.setDeviceMetricsOverride({ width: 1200, height: 630, deviceScaleFactor: 1, mobile: false })\nconst frame = session.waitFor(\"Page.screencastFrame\", { timeoutMs: 10_000 })  \u002F\u002F register first\nawait session.Page.startScreencast({ format: \"png\" })\ntry {\n  const f = await frame        \u002F\u002F f.data is base64, same as captureScreenshot\n} finally {\n  await session.Page.stopScreencast()   \u002F\u002F otherwise the cast stays open\n}\n",[3118],{"type":36,"tag":44,"props":3119,"children":3120},{"__ignoreMap":172},[3121,3152,3160,3272,3352,3416,3428,3459,3475,3514],{"type":36,"tag":178,"props":3122,"children":3123},{"class":180,"line":181},[3124,3128,3132,3136,3140,3144,3148],{"type":36,"tag":178,"props":3125,"children":3126},{"style":195},[3127],{"type":41,"value":198},{"type":36,"tag":178,"props":3129,"children":3130},{"style":201},[3131],{"type":41,"value":204},{"type":36,"tag":178,"props":3133,"children":3134},{"style":207},[3135],{"type":41,"value":210},{"type":36,"tag":178,"props":3137,"children":3138},{"style":201},[3139],{"type":41,"value":2072},{"type":36,"tag":178,"props":3141,"children":3142},{"style":207},[3143],{"type":41,"value":210},{"type":36,"tag":178,"props":3145,"children":3146},{"style":213},[3147],{"type":41,"value":2144},{"type":36,"tag":178,"props":3149,"children":3150},{"style":201},[3151],{"type":41,"value":221},{"type":36,"tag":178,"props":3153,"children":3154},{"class":180,"line":191},[3155],{"type":36,"tag":178,"props":3156,"children":3157},{"style":185},[3158],{"type":41,"value":3159},"\u002F\u002F Optional: screencast has no `clip`, so override the viewport for exact frame size.\n",{"type":36,"tag":178,"props":3161,"children":3162},{"class":180,"line":358},[3163,3167,3171,3175,3180,3184,3189,3193,3197,3202,3206,3211,3215,3220,3224,3229,3233,3238,3242,3246,3250,3255,3259,3264,3268],{"type":36,"tag":178,"props":3164,"children":3165},{"style":195},[3166],{"type":41,"value":198},{"type":36,"tag":178,"props":3168,"children":3169},{"style":201},[3170],{"type":41,"value":204},{"type":36,"tag":178,"props":3172,"children":3173},{"style":207},[3174],{"type":41,"value":210},{"type":36,"tag":178,"props":3176,"children":3177},{"style":201},[3178],{"type":41,"value":3179},"Emulation",{"type":36,"tag":178,"props":3181,"children":3182},{"style":207},[3183],{"type":41,"value":210},{"type":36,"tag":178,"props":3185,"children":3186},{"style":213},[3187],{"type":41,"value":3188},"setDeviceMetricsOverride",{"type":36,"tag":178,"props":3190,"children":3191},{"style":201},[3192],{"type":41,"value":588},{"type":36,"tag":178,"props":3194,"children":3195},{"style":207},[3196],{"type":41,"value":678},{"type":36,"tag":178,"props":3198,"children":3199},{"style":681},[3200],{"type":41,"value":3201}," width",{"type":36,"tag":178,"props":3203,"children":3204},{"style":207},[3205],{"type":41,"value":689},{"type":36,"tag":178,"props":3207,"children":3208},{"style":2214},[3209],{"type":41,"value":3210}," 1200",{"type":36,"tag":178,"props":3212,"children":3213},{"style":207},[3214],{"type":41,"value":929},{"type":36,"tag":178,"props":3216,"children":3217},{"style":681},[3218],{"type":41,"value":3219}," height",{"type":36,"tag":178,"props":3221,"children":3222},{"style":207},[3223],{"type":41,"value":689},{"type":36,"tag":178,"props":3225,"children":3226},{"style":2214},[3227],{"type":41,"value":3228}," 630",{"type":36,"tag":178,"props":3230,"children":3231},{"style":207},[3232],{"type":41,"value":929},{"type":36,"tag":178,"props":3234,"children":3235},{"style":681},[3236],{"type":41,"value":3237}," deviceScaleFactor",{"type":36,"tag":178,"props":3239,"children":3240},{"style":207},[3241],{"type":41,"value":689},{"type":36,"tag":178,"props":3243,"children":3244},{"style":2214},[3245],{"type":41,"value":2740},{"type":36,"tag":178,"props":3247,"children":3248},{"style":207},[3249],{"type":41,"value":929},{"type":36,"tag":178,"props":3251,"children":3252},{"style":681},[3253],{"type":41,"value":3254}," mobile",{"type":36,"tag":178,"props":3256,"children":3257},{"style":207},[3258],{"type":41,"value":689},{"type":36,"tag":178,"props":3260,"children":3261},{"style":2422},[3262],{"type":41,"value":3263}," false",{"type":36,"tag":178,"props":3265,"children":3266},{"style":207},[3267],{"type":41,"value":1596},{"type":36,"tag":178,"props":3269,"children":3270},{"style":201},[3271],{"type":41,"value":713},{"type":36,"tag":178,"props":3273,"children":3274},{"class":180,"line":367},[3275,3279,3284,3288,3292,3296,3300,3304,3308,3313,3317,3321,3325,3329,3333,3338,3342,3347],{"type":36,"tag":178,"props":3276,"children":3277},{"style":561},[3278],{"type":41,"value":564},{"type":36,"tag":178,"props":3280,"children":3281},{"style":201},[3282],{"type":41,"value":3283}," frame ",{"type":36,"tag":178,"props":3285,"children":3286},{"style":207},[3287],{"type":41,"value":428},{"type":36,"tag":178,"props":3289,"children":3290},{"style":201},[3291],{"type":41,"value":204},{"type":36,"tag":178,"props":3293,"children":3294},{"style":207},[3295],{"type":41,"value":210},{"type":36,"tag":178,"props":3297,"children":3298},{"style":213},[3299],{"type":41,"value":2177},{"type":36,"tag":178,"props":3301,"children":3302},{"style":201},[3303],{"type":41,"value":588},{"type":36,"tag":178,"props":3305,"children":3306},{"style":207},[3307],{"type":41,"value":593},{"type":36,"tag":178,"props":3309,"children":3310},{"style":347},[3311],{"type":41,"value":3312},"Page.screencastFrame",{"type":36,"tag":178,"props":3314,"children":3315},{"style":207},[3316],{"type":41,"value":593},{"type":36,"tag":178,"props":3318,"children":3319},{"style":207},[3320],{"type":41,"value":929},{"type":36,"tag":178,"props":3322,"children":3323},{"style":207},[3324],{"type":41,"value":982},{"type":36,"tag":178,"props":3326,"children":3327},{"style":681},[3328],{"type":41,"value":2207},{"type":36,"tag":178,"props":3330,"children":3331},{"style":207},[3332],{"type":41,"value":689},{"type":36,"tag":178,"props":3334,"children":3335},{"style":2214},[3336],{"type":41,"value":3337}," 10_000",{"type":36,"tag":178,"props":3339,"children":3340},{"style":207},[3341],{"type":41,"value":1596},{"type":36,"tag":178,"props":3343,"children":3344},{"style":201},[3345],{"type":41,"value":3346},")  ",{"type":36,"tag":178,"props":3348,"children":3349},{"style":185},[3350],{"type":41,"value":3351},"\u002F\u002F register first\n",{"type":36,"tag":178,"props":3353,"children":3354},{"class":180,"line":381},[3355,3359,3363,3367,3371,3375,3380,3384,3388,3392,3396,3400,3404,3408,3412],{"type":36,"tag":178,"props":3356,"children":3357},{"style":195},[3358],{"type":41,"value":198},{"type":36,"tag":178,"props":3360,"children":3361},{"style":201},[3362],{"type":41,"value":204},{"type":36,"tag":178,"props":3364,"children":3365},{"style":207},[3366],{"type":41,"value":210},{"type":36,"tag":178,"props":3368,"children":3369},{"style":201},[3370],{"type":41,"value":2072},{"type":36,"tag":178,"props":3372,"children":3373},{"style":207},[3374],{"type":41,"value":210},{"type":36,"tag":178,"props":3376,"children":3377},{"style":213},[3378],{"type":41,"value":3379},"startScreencast",{"type":36,"tag":178,"props":3381,"children":3382},{"style":201},[3383],{"type":41,"value":588},{"type":36,"tag":178,"props":3385,"children":3386},{"style":207},[3387],{"type":41,"value":678},{"type":36,"tag":178,"props":3389,"children":3390},{"style":681},[3391],{"type":41,"value":3012},{"type":36,"tag":178,"props":3393,"children":3394},{"style":207},[3395],{"type":41,"value":689},{"type":36,"tag":178,"props":3397,"children":3398},{"style":207},[3399],{"type":41,"value":951},{"type":36,"tag":178,"props":3401,"children":3402},{"style":347},[3403],{"type":41,"value":3025},{"type":36,"tag":178,"props":3405,"children":3406},{"style":207},[3407],{"type":41,"value":593},{"type":36,"tag":178,"props":3409,"children":3410},{"style":207},[3411],{"type":41,"value":1596},{"type":36,"tag":178,"props":3413,"children":3414},{"style":201},[3415],{"type":41,"value":713},{"type":36,"tag":178,"props":3417,"children":3418},{"class":180,"line":394},[3419,3424],{"type":36,"tag":178,"props":3420,"children":3421},{"style":195},[3422],{"type":41,"value":3423},"try",{"type":36,"tag":178,"props":3425,"children":3426},{"style":207},[3427],{"type":41,"value":934},{"type":36,"tag":178,"props":3429,"children":3430},{"class":180,"line":403},[3431,3436,3441,3445,3449,3454],{"type":36,"tag":178,"props":3432,"children":3433},{"style":561},[3434],{"type":41,"value":3435},"  const",{"type":36,"tag":178,"props":3437,"children":3438},{"style":201},[3439],{"type":41,"value":3440}," f",{"type":36,"tag":178,"props":3442,"children":3443},{"style":207},[3444],{"type":41,"value":1152},{"type":36,"tag":178,"props":3446,"children":3447},{"style":195},[3448],{"type":41,"value":578},{"type":36,"tag":178,"props":3450,"children":3451},{"style":201},[3452],{"type":41,"value":3453}," frame",{"type":36,"tag":178,"props":3455,"children":3456},{"style":185},[3457],{"type":41,"value":3458},"        \u002F\u002F f.data is base64, same as captureScreenshot\n",{"type":36,"tag":178,"props":3460,"children":3461},{"class":180,"line":417},[3462,3466,3471],{"type":36,"tag":178,"props":3463,"children":3464},{"style":207},[3465],{"type":41,"value":708},{"type":36,"tag":178,"props":3467,"children":3468},{"style":195},[3469],{"type":41,"value":3470}," finally",{"type":36,"tag":178,"props":3472,"children":3473},{"style":207},[3474],{"type":41,"value":934},{"type":36,"tag":178,"props":3476,"children":3477},{"class":180,"line":469},[3478,3483,3487,3491,3495,3499,3504,3509],{"type":36,"tag":178,"props":3479,"children":3480},{"style":195},[3481],{"type":41,"value":3482},"  await",{"type":36,"tag":178,"props":3484,"children":3485},{"style":201},[3486],{"type":41,"value":204},{"type":36,"tag":178,"props":3488,"children":3489},{"style":207},[3490],{"type":41,"value":210},{"type":36,"tag":178,"props":3492,"children":3493},{"style":201},[3494],{"type":41,"value":2072},{"type":36,"tag":178,"props":3496,"children":3497},{"style":207},[3498],{"type":41,"value":210},{"type":36,"tag":178,"props":3500,"children":3501},{"style":213},[3502],{"type":41,"value":3503},"stopScreencast",{"type":36,"tag":178,"props":3505,"children":3506},{"style":681},[3507],{"type":41,"value":3508},"()   ",{"type":36,"tag":178,"props":3510,"children":3511},{"style":185},[3512],{"type":41,"value":3513},"\u002F\u002F otherwise the cast stays open\n",{"type":36,"tag":178,"props":3515,"children":3516},{"class":180,"line":478},[3517],{"type":36,"tag":178,"props":3518,"children":3519},{"style":207},[3520],{"type":41,"value":3521},"}\n",{"type":36,"tag":112,"props":3523,"children":3525},{"id":3524},"reusing-code",[3526],{"type":41,"value":3527},"Reusing code",{"type":36,"tag":37,"props":3529,"children":3530},{},[3531,3533,3539],{"type":41,"value":3532},"The agent-workspace is per-project: ",{"type":36,"tag":44,"props":3534,"children":3536},{"className":3535},[],[3537],{"type":41,"value":3538},".\u002F.bcode\u002Fagent-workspace\u002F",{"type":41,"value":3540},".\nUse this to write memory files, scripts, and helper functions.\nImports work at any depth; pick whatever layout makes the project easiest to navigate.",{"type":36,"tag":167,"props":3542,"children":3546},{"className":3543,"code":3544,"language":3545,"meta":172,"style":172},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F .\u002F.bcode\u002Fagent-workspace\u002Fscrape_titles.ts (you write this with the `write` tool)\nexport async function scrapeTitles(session: any, urls: string[]) {\n  const titles: string[] = []\n  await session.Page.enable()\n  for (const url of urls) {\n    const loaded = session.waitFor(\"Page.loadEventFired\", { timeoutMs: 15_000 })\n    await session.Page.navigate({ url })\n    await loaded\n    const r = await session.Runtime.evaluate({ expression: \"document.title\", returnByValue: true })\n    titles.push(r.result.value)\n  }\n  return titles\n}\n","ts",[3547],{"type":36,"tag":44,"props":3548,"children":3549},{"__ignoreMap":172},[3550,3558,3629,3663,3694,3732,3805,3853,3864,3957,4003,4011,4024],{"type":36,"tag":178,"props":3551,"children":3552},{"class":180,"line":181},[3553],{"type":36,"tag":178,"props":3554,"children":3555},{"style":185},[3556],{"type":41,"value":3557},"\u002F\u002F .\u002F.bcode\u002Fagent-workspace\u002Fscrape_titles.ts (you write this with the `write` tool)\n",{"type":36,"tag":178,"props":3559,"children":3560},{"class":180,"line":191},[3561,3566,3571,3576,3581,3585,3589,3593,3598,3602,3607,3611,3616,3621,3625],{"type":36,"tag":178,"props":3562,"children":3563},{"style":195},[3564],{"type":41,"value":3565},"export",{"type":36,"tag":178,"props":3567,"children":3568},{"style":561},[3569],{"type":41,"value":3570}," async",{"type":36,"tag":178,"props":3572,"children":3573},{"style":561},[3574],{"type":41,"value":3575}," function",{"type":36,"tag":178,"props":3577,"children":3578},{"style":213},[3579],{"type":41,"value":3580}," scrapeTitles",{"type":36,"tag":178,"props":3582,"children":3583},{"style":207},[3584],{"type":41,"value":588},{"type":36,"tag":178,"props":3586,"children":3587},{"style":623},[3588],{"type":41,"value":57},{"type":36,"tag":178,"props":3590,"children":3591},{"style":207},[3592],{"type":41,"value":689},{"type":36,"tag":178,"props":3594,"children":3595},{"style":341},[3596],{"type":41,"value":3597}," any",{"type":36,"tag":178,"props":3599,"children":3600},{"style":207},[3601],{"type":41,"value":929},{"type":36,"tag":178,"props":3603,"children":3604},{"style":623},[3605],{"type":41,"value":3606}," urls",{"type":36,"tag":178,"props":3608,"children":3609},{"style":207},[3610],{"type":41,"value":689},{"type":36,"tag":178,"props":3612,"children":3613},{"style":341},[3614],{"type":41,"value":3615}," string",{"type":36,"tag":178,"props":3617,"children":3618},{"style":201},[3619],{"type":41,"value":3620},"[]",{"type":36,"tag":178,"props":3622,"children":3623},{"style":207},[3624],{"type":41,"value":607},{"type":36,"tag":178,"props":3626,"children":3627},{"style":207},[3628],{"type":41,"value":934},{"type":36,"tag":178,"props":3630,"children":3631},{"class":180,"line":358},[3632,3636,3641,3645,3649,3654,3658],{"type":36,"tag":178,"props":3633,"children":3634},{"style":561},[3635],{"type":41,"value":3435},{"type":36,"tag":178,"props":3637,"children":3638},{"style":201},[3639],{"type":41,"value":3640}," titles",{"type":36,"tag":178,"props":3642,"children":3643},{"style":207},[3644],{"type":41,"value":689},{"type":36,"tag":178,"props":3646,"children":3647},{"style":341},[3648],{"type":41,"value":3615},{"type":36,"tag":178,"props":3650,"children":3651},{"style":681},[3652],{"type":41,"value":3653},"[] ",{"type":36,"tag":178,"props":3655,"children":3656},{"style":207},[3657],{"type":41,"value":428},{"type":36,"tag":178,"props":3659,"children":3660},{"style":681},[3661],{"type":41,"value":3662}," []\n",{"type":36,"tag":178,"props":3664,"children":3665},{"class":180,"line":367},[3666,3670,3674,3678,3682,3686,3690],{"type":36,"tag":178,"props":3667,"children":3668},{"style":195},[3669],{"type":41,"value":3482},{"type":36,"tag":178,"props":3671,"children":3672},{"style":201},[3673],{"type":41,"value":204},{"type":36,"tag":178,"props":3675,"children":3676},{"style":207},[3677],{"type":41,"value":210},{"type":36,"tag":178,"props":3679,"children":3680},{"style":201},[3681],{"type":41,"value":2072},{"type":36,"tag":178,"props":3683,"children":3684},{"style":207},[3685],{"type":41,"value":210},{"type":36,"tag":178,"props":3687,"children":3688},{"style":213},[3689],{"type":41,"value":2144},{"type":36,"tag":178,"props":3691,"children":3692},{"style":681},[3693],{"type":41,"value":221},{"type":36,"tag":178,"props":3695,"children":3696},{"class":180,"line":381},[3697,3702,3706,3710,3714,3719,3723,3728],{"type":36,"tag":178,"props":3698,"children":3699},{"style":195},[3700],{"type":41,"value":3701},"  for",{"type":36,"tag":178,"props":3703,"children":3704},{"style":681},[3705],{"type":41,"value":1757},{"type":36,"tag":178,"props":3707,"children":3708},{"style":561},[3709],{"type":41,"value":564},{"type":36,"tag":178,"props":3711,"children":3712},{"style":201},[3713],{"type":41,"value":2266},{"type":36,"tag":178,"props":3715,"children":3716},{"style":207},[3717],{"type":41,"value":3718}," of",{"type":36,"tag":178,"props":3720,"children":3721},{"style":201},[3722],{"type":41,"value":3606},{"type":36,"tag":178,"props":3724,"children":3725},{"style":681},[3726],{"type":41,"value":3727},") ",{"type":36,"tag":178,"props":3729,"children":3730},{"style":207},[3731],{"type":41,"value":2378},{"type":36,"tag":178,"props":3733,"children":3734},{"class":180,"line":394},[3735,3740,3745,3749,3753,3757,3761,3765,3769,3773,3777,3781,3785,3789,3793,3797,3801],{"type":36,"tag":178,"props":3736,"children":3737},{"style":561},[3738],{"type":41,"value":3739},"    const",{"type":36,"tag":178,"props":3741,"children":3742},{"style":201},[3743],{"type":41,"value":3744}," loaded",{"type":36,"tag":178,"props":3746,"children":3747},{"style":207},[3748],{"type":41,"value":1152},{"type":36,"tag":178,"props":3750,"children":3751},{"style":201},[3752],{"type":41,"value":204},{"type":36,"tag":178,"props":3754,"children":3755},{"style":207},[3756],{"type":41,"value":210},{"type":36,"tag":178,"props":3758,"children":3759},{"style":213},[3760],{"type":41,"value":2177},{"type":36,"tag":178,"props":3762,"children":3763},{"style":681},[3764],{"type":41,"value":588},{"type":36,"tag":178,"props":3766,"children":3767},{"style":207},[3768],{"type":41,"value":593},{"type":36,"tag":178,"props":3770,"children":3771},{"style":347},[3772],{"type":41,"value":2190},{"type":36,"tag":178,"props":3774,"children":3775},{"style":207},[3776],{"type":41,"value":593},{"type":36,"tag":178,"props":3778,"children":3779},{"style":207},[3780],{"type":41,"value":929},{"type":36,"tag":178,"props":3782,"children":3783},{"style":207},[3784],{"type":41,"value":982},{"type":36,"tag":178,"props":3786,"children":3787},{"style":681},[3788],{"type":41,"value":2207},{"type":36,"tag":178,"props":3790,"children":3791},{"style":207},[3792],{"type":41,"value":689},{"type":36,"tag":178,"props":3794,"children":3795},{"style":2214},[3796],{"type":41,"value":2217},{"type":36,"tag":178,"props":3798,"children":3799},{"style":207},[3800],{"type":41,"value":1596},{"type":36,"tag":178,"props":3802,"children":3803},{"style":681},[3804],{"type":41,"value":713},{"type":36,"tag":178,"props":3806,"children":3807},{"class":180,"line":403},[3808,3813,3817,3821,3825,3829,3833,3837,3841,3845,3849],{"type":36,"tag":178,"props":3809,"children":3810},{"style":195},[3811],{"type":41,"value":3812},"    await",{"type":36,"tag":178,"props":3814,"children":3815},{"style":201},[3816],{"type":41,"value":204},{"type":36,"tag":178,"props":3818,"children":3819},{"style":207},[3820],{"type":41,"value":210},{"type":36,"tag":178,"props":3822,"children":3823},{"style":201},[3824],{"type":41,"value":2072},{"type":36,"tag":178,"props":3826,"children":3827},{"style":207},[3828],{"type":41,"value":210},{"type":36,"tag":178,"props":3830,"children":3831},{"style":213},[3832],{"type":41,"value":2253},{"type":36,"tag":178,"props":3834,"children":3835},{"style":681},[3836],{"type":41,"value":588},{"type":36,"tag":178,"props":3838,"children":3839},{"style":207},[3840],{"type":41,"value":678},{"type":36,"tag":178,"props":3842,"children":3843},{"style":201},[3844],{"type":41,"value":2266},{"type":36,"tag":178,"props":3846,"children":3847},{"style":207},[3848],{"type":41,"value":1596},{"type":36,"tag":178,"props":3850,"children":3851},{"style":681},[3852],{"type":41,"value":713},{"type":36,"tag":178,"props":3854,"children":3855},{"class":180,"line":417},[3856,3860],{"type":36,"tag":178,"props":3857,"children":3858},{"style":195},[3859],{"type":41,"value":3812},{"type":36,"tag":178,"props":3861,"children":3862},{"style":201},[3863],{"type":41,"value":2303},{"type":36,"tag":178,"props":3865,"children":3866},{"class":180,"line":469},[3867,3871,3875,3879,3883,3887,3891,3895,3899,3903,3907,3911,3916,3920,3924,3928,3932,3936,3941,3945,3949,3953],{"type":36,"tag":178,"props":3868,"children":3869},{"style":561},[3870],{"type":41,"value":3739},{"type":36,"tag":178,"props":3872,"children":3873},{"style":201},[3874],{"type":41,"value":636},{"type":36,"tag":178,"props":3876,"children":3877},{"style":207},[3878],{"type":41,"value":1152},{"type":36,"tag":178,"props":3880,"children":3881},{"style":195},[3882],{"type":41,"value":578},{"type":36,"tag":178,"props":3884,"children":3885},{"style":201},[3886],{"type":41,"value":204},{"type":36,"tag":178,"props":3888,"children":3889},{"style":207},[3890],{"type":41,"value":210},{"type":36,"tag":178,"props":3892,"children":3893},{"style":201},[3894],{"type":41,"value":2360},{"type":36,"tag":178,"props":3896,"children":3897},{"style":207},[3898],{"type":41,"value":210},{"type":36,"tag":178,"props":3900,"children":3901},{"style":213},[3902],{"type":41,"value":2369},{"type":36,"tag":178,"props":3904,"children":3905},{"style":681},[3906],{"type":41,"value":588},{"type":36,"tag":178,"props":3908,"children":3909},{"style":207},[3910],{"type":41,"value":678},{"type":36,"tag":178,"props":3912,"children":3913},{"style":681},[3914],{"type":41,"value":3915}," expression",{"type":36,"tag":178,"props":3917,"children":3918},{"style":207},[3919],{"type":41,"value":689},{"type":36,"tag":178,"props":3921,"children":3922},{"style":207},[3923],{"type":41,"value":951},{"type":36,"tag":178,"props":3925,"children":3926},{"style":347},[3927],{"type":41,"value":2399},{"type":36,"tag":178,"props":3929,"children":3930},{"style":207},[3931],{"type":41,"value":593},{"type":36,"tag":178,"props":3933,"children":3934},{"style":207},[3935],{"type":41,"value":929},{"type":36,"tag":178,"props":3937,"children":3938},{"style":681},[3939],{"type":41,"value":3940}," returnByValue",{"type":36,"tag":178,"props":3942,"children":3943},{"style":207},[3944],{"type":41,"value":689},{"type":36,"tag":178,"props":3946,"children":3947},{"style":2422},[3948],{"type":41,"value":2425},{"type":36,"tag":178,"props":3950,"children":3951},{"style":207},[3952],{"type":41,"value":1596},{"type":36,"tag":178,"props":3954,"children":3955},{"style":681},[3956],{"type":41,"value":713},{"type":36,"tag":178,"props":3958,"children":3959},{"class":180,"line":478},[3960,3965,3969,3974,3978,3982,3986,3990,3994,3999],{"type":36,"tag":178,"props":3961,"children":3962},{"style":201},[3963],{"type":41,"value":3964},"    titles",{"type":36,"tag":178,"props":3966,"children":3967},{"style":207},[3968],{"type":41,"value":210},{"type":36,"tag":178,"props":3970,"children":3971},{"style":213},[3972],{"type":41,"value":3973},"push",{"type":36,"tag":178,"props":3975,"children":3976},{"style":681},[3977],{"type":41,"value":588},{"type":36,"tag":178,"props":3979,"children":3980},{"style":201},[3981],{"type":41,"value":626},{"type":36,"tag":178,"props":3983,"children":3984},{"style":207},[3985],{"type":41,"value":210},{"type":36,"tag":178,"props":3987,"children":3988},{"style":201},[3989],{"type":41,"value":2471},{"type":36,"tag":178,"props":3991,"children":3992},{"style":207},[3993],{"type":41,"value":210},{"type":36,"tag":178,"props":3995,"children":3996},{"style":201},[3997],{"type":41,"value":3998},"value",{"type":36,"tag":178,"props":4000,"children":4001},{"style":681},[4002],{"type":41,"value":713},{"type":36,"tag":178,"props":4004,"children":4005},{"class":180,"line":497},[4006],{"type":36,"tag":178,"props":4007,"children":4008},{"style":207},[4009],{"type":41,"value":4010},"  }\n",{"type":36,"tag":178,"props":4012,"children":4013},{"class":180,"line":2432},[4014,4019],{"type":36,"tag":178,"props":4015,"children":4016},{"style":195},[4017],{"type":41,"value":4018},"  return",{"type":36,"tag":178,"props":4020,"children":4021},{"style":201},[4022],{"type":41,"value":4023}," titles\n",{"type":36,"tag":178,"props":4025,"children":4026},{"class":180,"line":2444},[4027],{"type":36,"tag":178,"props":4028,"children":4029},{"style":207},[4030],{"type":41,"value":3521},{"type":36,"tag":167,"props":4032,"children":4034},{"className":169,"code":4033,"language":171,"meta":172,"style":172},"\u002F\u002F later snippet\nconst path = process.cwd() + \"\u002F.bcode\u002Fagent-workspace\u002Fscrape_titles.ts\"\n\u002F\u002F Cache-bust (`?t=${Date.now()}`) is your responsibility: without it, edits to the file won't be picked up. \nconst m = await import(`${path}?t=${Date.now()}`)\nconst titles = await m.scrapeTitles(session, [\"https:\u002F\u002Fexample.com\", \"https:\u002F\u002Fexample.org\"])\nconsole.log(JSON.stringify(titles))\n",[4035],{"type":36,"tag":44,"props":4036,"children":4037},{"__ignoreMap":172},[4038,4046,4099,4107,4185,4267],{"type":36,"tag":178,"props":4039,"children":4040},{"class":180,"line":181},[4041],{"type":36,"tag":178,"props":4042,"children":4043},{"style":185},[4044],{"type":41,"value":4045},"\u002F\u002F later snippet\n",{"type":36,"tag":178,"props":4047,"children":4048},{"class":180,"line":191},[4049,4053,4058,4062,4066,4070,4075,4080,4085,4089,4094],{"type":36,"tag":178,"props":4050,"children":4051},{"style":561},[4052],{"type":41,"value":564},{"type":36,"tag":178,"props":4054,"children":4055},{"style":201},[4056],{"type":41,"value":4057}," path ",{"type":36,"tag":178,"props":4059,"children":4060},{"style":207},[4061],{"type":41,"value":428},{"type":36,"tag":178,"props":4063,"children":4064},{"style":201},[4065],{"type":41,"value":1004},{"type":36,"tag":178,"props":4067,"children":4068},{"style":207},[4069],{"type":41,"value":210},{"type":36,"tag":178,"props":4071,"children":4072},{"style":213},[4073],{"type":41,"value":4074},"cwd",{"type":36,"tag":178,"props":4076,"children":4077},{"style":201},[4078],{"type":41,"value":4079},"() ",{"type":36,"tag":178,"props":4081,"children":4082},{"style":207},[4083],{"type":41,"value":4084},"+",{"type":36,"tag":178,"props":4086,"children":4087},{"style":207},[4088],{"type":41,"value":951},{"type":36,"tag":178,"props":4090,"children":4091},{"style":347},[4092],{"type":41,"value":4093},"\u002F.bcode\u002Fagent-workspace\u002Fscrape_titles.ts",{"type":36,"tag":178,"props":4095,"children":4096},{"style":207},[4097],{"type":41,"value":4098},"\"\n",{"type":36,"tag":178,"props":4100,"children":4101},{"class":180,"line":358},[4102],{"type":36,"tag":178,"props":4103,"children":4104},{"style":185},[4105],{"type":41,"value":4106},"\u002F\u002F Cache-bust (`?t=${Date.now()}`) is your responsibility: without it, edits to the file won't be picked up. \n",{"type":36,"tag":178,"props":4108,"children":4109},{"class":180,"line":367},[4110,4114,4119,4123,4127,4132,4136,4140,4145,4149,4154,4158,4163,4167,4172,4177,4181],{"type":36,"tag":178,"props":4111,"children":4112},{"style":561},[4113],{"type":41,"value":564},{"type":36,"tag":178,"props":4115,"children":4116},{"style":201},[4117],{"type":41,"value":4118}," m ",{"type":36,"tag":178,"props":4120,"children":4121},{"style":207},[4122],{"type":41,"value":428},{"type":36,"tag":178,"props":4124,"children":4125},{"style":195},[4126],{"type":41,"value":578},{"type":36,"tag":178,"props":4128,"children":4129},{"style":207},[4130],{"type":41,"value":4131}," import",{"type":36,"tag":178,"props":4133,"children":4134},{"style":201},[4135],{"type":41,"value":588},{"type":36,"tag":178,"props":4137,"children":4138},{"style":207},[4139],{"type":41,"value":1204},{"type":36,"tag":178,"props":4141,"children":4142},{"style":201},[4143],{"type":41,"value":4144},"path",{"type":36,"tag":178,"props":4146,"children":4147},{"style":207},[4148],{"type":41,"value":708},{"type":36,"tag":178,"props":4150,"children":4151},{"style":347},[4152],{"type":41,"value":4153},"?t=",{"type":36,"tag":178,"props":4155,"children":4156},{"style":207},[4157],{"type":41,"value":1403},{"type":36,"tag":178,"props":4159,"children":4160},{"style":201},[4161],{"type":41,"value":4162},"Date",{"type":36,"tag":178,"props":4164,"children":4165},{"style":207},[4166],{"type":41,"value":210},{"type":36,"tag":178,"props":4168,"children":4169},{"style":213},[4170],{"type":41,"value":4171},"now",{"type":36,"tag":178,"props":4173,"children":4174},{"style":201},[4175],{"type":41,"value":4176},"()",{"type":36,"tag":178,"props":4178,"children":4179},{"style":207},[4180],{"type":41,"value":1413},{"type":36,"tag":178,"props":4182,"children":4183},{"style":201},[4184],{"type":41,"value":713},{"type":36,"tag":178,"props":4186,"children":4187},{"class":180,"line":381},[4188,4192,4197,4201,4205,4210,4214,4219,4224,4228,4233,4237,4241,4245,4249,4253,4258,4262],{"type":36,"tag":178,"props":4189,"children":4190},{"style":561},[4191],{"type":41,"value":564},{"type":36,"tag":178,"props":4193,"children":4194},{"style":201},[4195],{"type":41,"value":4196}," titles ",{"type":36,"tag":178,"props":4198,"children":4199},{"style":207},[4200],{"type":41,"value":428},{"type":36,"tag":178,"props":4202,"children":4203},{"style":195},[4204],{"type":41,"value":578},{"type":36,"tag":178,"props":4206,"children":4207},{"style":201},[4208],{"type":41,"value":4209}," m",{"type":36,"tag":178,"props":4211,"children":4212},{"style":207},[4213],{"type":41,"value":210},{"type":36,"tag":178,"props":4215,"children":4216},{"style":213},[4217],{"type":41,"value":4218},"scrapeTitles",{"type":36,"tag":178,"props":4220,"children":4221},{"style":201},[4222],{"type":41,"value":4223},"(session",{"type":36,"tag":178,"props":4225,"children":4226},{"style":207},[4227],{"type":41,"value":929},{"type":36,"tag":178,"props":4229,"children":4230},{"style":201},[4231],{"type":41,"value":4232}," [",{"type":36,"tag":178,"props":4234,"children":4235},{"style":207},[4236],{"type":41,"value":593},{"type":36,"tag":178,"props":4238,"children":4239},{"style":347},[4240],{"type":41,"value":2279},{"type":36,"tag":178,"props":4242,"children":4243},{"style":207},[4244],{"type":41,"value":593},{"type":36,"tag":178,"props":4246,"children":4247},{"style":207},[4248],{"type":41,"value":929},{"type":36,"tag":178,"props":4250,"children":4251},{"style":207},[4252],{"type":41,"value":951},{"type":36,"tag":178,"props":4254,"children":4255},{"style":347},[4256],{"type":41,"value":4257},"https:\u002F\u002Fexample.org",{"type":36,"tag":178,"props":4259,"children":4260},{"style":207},[4261],{"type":41,"value":593},{"type":36,"tag":178,"props":4263,"children":4264},{"style":201},[4265],{"type":41,"value":4266},"])\n",{"type":36,"tag":178,"props":4268,"children":4269},{"class":180,"line":394},[4270,4274,4278,4282,4287,4291,4295],{"type":36,"tag":178,"props":4271,"children":4272},{"style":201},[4273],{"type":41,"value":87},{"type":36,"tag":178,"props":4275,"children":4276},{"style":207},[4277],{"type":41,"value":210},{"type":36,"tag":178,"props":4279,"children":4280},{"style":213},[4281],{"type":41,"value":1333},{"type":36,"tag":178,"props":4283,"children":4284},{"style":201},[4285],{"type":41,"value":4286},"(JSON",{"type":36,"tag":178,"props":4288,"children":4289},{"style":207},[4290],{"type":41,"value":210},{"type":36,"tag":178,"props":4292,"children":4293},{"style":213},[4294],{"type":41,"value":1561},{"type":36,"tag":178,"props":4296,"children":4297},{"style":201},[4298],{"type":41,"value":4299},"(titles))\n",{"type":36,"tag":112,"props":4301,"children":4303},{"id":4302},"guardrails",[4304],{"type":41,"value":4305},"Guardrails",{"type":36,"tag":241,"props":4307,"children":4308},{},[4309,4330,4350],{"type":36,"tag":245,"props":4310,"children":4311},{},[4312,4314,4320,4322,4328],{"type":41,"value":4313},"Top-level ",{"type":36,"tag":44,"props":4315,"children":4317},{"className":4316},[],[4318],{"type":41,"value":4319},"import",{"type":41,"value":4321}," statements inside the snippet body are not allowed. Use ",{"type":36,"tag":44,"props":4323,"children":4325},{"className":4324},[],[4326],{"type":41,"value":4327},"await import(...)",{"type":41,"value":4329}," instead.",{"type":36,"tag":245,"props":4331,"children":4332},{},[4333,4335,4340,4342,4348],{"type":41,"value":4334},"No CPU-bound infinite loops without ",{"type":36,"tag":44,"props":4336,"children":4338},{"className":4337},[],[4339],{"type":41,"value":198},{"type":41,"value":4341}," — they ignore the timeout. Insert ",{"type":36,"tag":44,"props":4343,"children":4345},{"className":4344},[],[4346],{"type":41,"value":4347},"await new Promise(r => setTimeout(r, 0))",{"type":41,"value":4349}," to yield.",{"type":36,"tag":245,"props":4351,"children":4352},{},[4353,4358,4360,4366],{"type":36,"tag":44,"props":4354,"children":4356},{"className":4355},[],[4357],{"type":41,"value":49},{"type":41,"value":4359}," defaults to 60s (max 600s). For longer work, set the tool's top-level ",{"type":36,"tag":44,"props":4361,"children":4363},{"className":4362},[],[4364],{"type":41,"value":4365},"timeout",{"type":41,"value":4367},"; inner CDP timeouts do not extend it. Keep batches small and log progress — timeout errors return recent logs, and a timeout resets the CDP session. Reconnect deliberately after a timeout so a run that switched browsers cannot silently return to its original browser.",{"type":36,"tag":112,"props":4369,"children":4370},{"id":87},[4371],{"type":41,"value":4372},"Console",{"type":36,"tag":241,"props":4374,"children":4375},{},[4376,4423],{"type":36,"tag":245,"props":4377,"children":4378},{},[4379,4385,4386,4392,4393,4399,4400,4406,4407,4413,4415,4421],{"type":36,"tag":44,"props":4380,"children":4382},{"className":4381},[],[4383],{"type":41,"value":4384},"console.log",{"type":41,"value":81},{"type":36,"tag":44,"props":4387,"children":4389},{"className":4388},[],[4390],{"type":41,"value":4391},"console.error",{"type":41,"value":81},{"type":36,"tag":44,"props":4394,"children":4396},{"className":4395},[],[4397],{"type":41,"value":4398},"console.warn",{"type":41,"value":81},{"type":36,"tag":44,"props":4401,"children":4403},{"className":4402},[],[4404],{"type":41,"value":4405},"console.info",{"type":41,"value":81},{"type":36,"tag":44,"props":4408,"children":4410},{"className":4409},[],[4411],{"type":41,"value":4412},"console.debug",{"type":41,"value":4414}," are all captured and streamed to the user. Treat them as your stdout. Other ",{"type":36,"tag":44,"props":4416,"children":4418},{"className":4417},[],[4419],{"type":41,"value":4420},"console.*",{"type":41,"value":4422}," methods write to bcode's stderr without being captured into the tool result.",{"type":36,"tag":245,"props":4424,"children":4425},{},[4426,4428,4434],{"type":41,"value":4427},"The snippet's ",{"type":36,"tag":44,"props":4429,"children":4431},{"className":4430},[],[4432],{"type":41,"value":4433},"return",{"type":41,"value":4435}," value is captured separately (JSON-serialized when possible).",{"type":36,"tag":4437,"props":4438,"children":4439},"style",{},[4440],{"type":41,"value":4441},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":4443,"total":2444},[4444,4459,4473,4483,4494,4513,4534,4547,4564,4580,4602,4607],{"slug":8,"name":8,"fn":4445,"description":4446,"org":4447,"tags":4448,"stars":4456,"repoUrl":4457,"updatedAt":4458},"automate browser interactions","Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site\u002Fapp work.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4449,4452,4453],{"name":4450,"slug":4451,"type":15},"Automation","automation",{"name":17,"slug":18,"type":15},{"name":4454,"slug":4455,"type":15},"Web Scraping","web-scraping",106789,"https:\u002F\u002Fgithub.com\u002Fbrowser-use\u002Fbrowser-use","2026-07-28T05:35:58.143842",{"slug":4460,"name":4460,"fn":4461,"description":4462,"org":4463,"tags":4464,"stars":4456,"repoUrl":4457,"updatedAt":4472},"cloud","use Browser Use Cloud API","Documentation reference for using Browser Use Cloud — the hosted API and SDK for browser automation. Use this skill whenever the user needs help with the Cloud REST API (v2 or v3), browser-use-sdk (Python or TypeScript), X-Browser-Use-API-Key authentication, cloud sessions, browser profiles, profile sync, CDP WebSocket connections, stealth browsers, residential proxies, CAPTCHA handling, webhooks, workspaces, skills marketplace, liveUrl streaming, pricing, or integration patterns (chat UI, subagent, adding browser tools to existing agents). Also trigger for questions about n8n\u002FMake\u002FZapier integration, Playwright\u002F Puppeteer\u002FSelenium on cloud infrastructure, or 1Password vault integration. Do NOT use this for the open-source Python library (Agent, Browser, Tools config) — use the open-source skill instead.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4465,4466,4469],{"name":17,"slug":18,"type":15},{"name":4467,"slug":4468,"type":15},"Python","python",{"name":4470,"slug":4471,"type":15},"REST API","rest-api","2026-04-06T18:06:10.225871",{"slug":4474,"name":4474,"fn":4475,"description":4476,"org":4477,"tags":4478,"stars":4456,"repoUrl":4457,"updatedAt":4482},"open-source","write browser-use Python code","Documentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or Tools configuration, is writing code that imports from browser_use, asks about @sandbox deployment, supported LLM models, Actor API, custom tools, lifecycle hooks, MCP server setup, or monitoring\u002Fobservability with Laminar or OpenLIT. Also trigger for questions about browser-use installation, prompting strategies, or sensitive data handling. Do NOT use this for Cloud API\u002FSDK usage or pricing — use the cloud skill instead. Do NOT use this for directly automating a browser via CLI commands — use the browser-use skill instead.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4479,4480,4481],{"name":4450,"slug":4451,"type":15},{"name":17,"slug":18,"type":15},{"name":4467,"slug":4468,"type":15},"2026-04-06T18:06:14.102374",{"slug":4484,"name":4484,"fn":4485,"description":4486,"org":4487,"tags":4488,"stars":4456,"repoUrl":4457,"updatedAt":4493},"remote-browser","control a local browser from a sandbox","Controls a local browser from a sandboxed remote machine. Use when the agent is running in a sandbox (no GUI) and needs to navigate websites, interact with web pages, fill forms, take screenshots, or expose local dev servers via tunnels.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4489,4490],{"name":17,"slug":18,"type":15},{"name":4491,"slug":4492,"type":15},"Sandboxing","sandboxing","2026-04-06T18:06:12.842351",{"slug":4495,"name":4495,"fn":4496,"description":4497,"org":4498,"tags":4499,"stars":4456,"repoUrl":4457,"updatedAt":4512},"x402","configure x402 payments for Browser Use Cloud","Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — \"just use it\" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing touches your codebase) or \"build it in\" (install the SDK and write the key + code into your project). Walks through wallet setup, funding, .env, and a ~$1 test run. Use when the user asks about x402, pay-per-use, USDC payments, or wants Browser Use Cloud without an API key. For the free-tier signup (reverse-CAPTCHA → API key), use `browser-use cloud signup` or the `cloud` skill instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4500,4501,4504,4505,4508,4511],{"name":4450,"slug":4451,"type":15},{"name":4502,"slug":4503,"type":15},"Base","base",{"name":17,"slug":18,"type":15},{"name":4506,"slug":4507,"type":15},"Payments","payments",{"name":4509,"slug":4510,"type":15},"Web3","web3",{"name":4495,"slug":4495,"type":15},"2026-06-02T07:51:20.889935",{"slug":4514,"name":4514,"fn":4515,"description":4516,"org":4517,"tags":4518,"stars":4531,"repoUrl":4532,"updatedAt":4533},"manim-video","create technical animations with Manim","Production pipeline for mathematical and technical animations using Manim Community Edition. Creates 3Blue1Brown-style explainer videos, algorithm visualizations, equation derivations, architecture diagrams, and data stories. Use when users request: animated explanations, math animations, concept visualizations, algorithm walkthroughs, technical explainers, 3Blue1Brown style videos, or any programmatic animation with geometric\u002Fmathematical content.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4519,4522,4525,4528],{"name":4520,"slug":4521,"type":15},"Animation","animation",{"name":4523,"slug":4524,"type":15},"Creative","creative",{"name":4526,"slug":4527,"type":15},"Mathematics","mathematics",{"name":4529,"slug":4530,"type":15},"Video","video",17171,"https:\u002F\u002Fgithub.com\u002Fbrowser-use\u002Fvideo-use","2026-04-16T05:01:44.229054",{"slug":4535,"name":4535,"fn":4536,"description":4537,"org":4538,"tags":4539,"stars":4531,"repoUrl":4532,"updatedAt":4546},"video-use","edit and process videos via conversation","Edit any video by conversation. Transcribe, cut, color grade, generate overlay animations, burn subtitles — for talking heads, montages, tutorials, travel, interviews. No presets, no menus. Ask questions, confirm the plan, execute, iterate, persist. Production-correctness rules are hard; everything else is artistic freedom.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4540,4541,4542,4545],{"name":4520,"slug":4521,"type":15},{"name":4523,"slug":4524,"type":15},{"name":4543,"slug":4544,"type":15},"Transcription","transcription",{"name":4529,"slug":4530,"type":15},"2026-04-16T12:17:10.522375",{"slug":4548,"name":4548,"fn":4549,"description":4550,"org":4551,"tags":4552,"stars":4561,"repoUrl":4562,"updatedAt":4563},"browser-use-terminal","automate web interactions via CLI","Direct browser control via the Browser Use Terminal CLI. Use when the user wants to automate, scrape, test, or interact with web pages — you drive the browser yourself with Python helpers.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4553,4554,4557,4558],{"name":17,"slug":18,"type":15},{"name":4555,"slug":4556,"type":15},"CLI","cli",{"name":4467,"slug":4468,"type":15},{"name":4559,"slug":4560,"type":15},"Web Development","web-development",607,"https:\u002F\u002Fgithub.com\u002Fbrowser-use\u002Fterminal","2026-06-12T08:15:38.34797",{"slug":4565,"name":4565,"fn":4566,"description":4567,"org":4568,"tags":4569,"stars":4577,"repoUrl":4578,"updatedAt":4579},"cdp","drive Chrome via DevTools Protocol","Drive Chrome via the DevTools Protocol from JavaScript. Run JS snippets through the `browser-harness-js` CLI — it auto-spawns a long-lived bun HTTP server holding a fully-typed CDP `Session`, and every call (`browser-harness-js 'await session.Page.navigate(...)'`) executes against the same persistent connection. Session, active target, and globals survive across calls. Use when the user wants to automate, script, or inspect a Chrome browser via CDP — single tab or multi-tab, attach to existing Chrome or to a new one launched with --remote-debugging-port.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4570,4571,4574],{"name":17,"slug":18,"type":15},{"name":4572,"slug":4573,"type":15},"JavaScript","javascript",{"name":4575,"slug":4576,"type":15},"Testing","testing",473,"https:\u002F\u002Fgithub.com\u002Fbrowser-use\u002Fbrowser-harness-js","2026-04-21T04:55:40.331082",{"slug":4581,"name":4581,"fn":4582,"description":4583,"org":4584,"tags":4585,"stars":19,"repoUrl":20,"updatedAt":4601},"agents-sdk","build AI agents on Cloudflare Workers","Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4586,4589,4592,4595,4598],{"name":4587,"slug":4588,"type":15},"Agents","agents",{"name":4590,"slug":4591,"type":15},"AI Infrastructure","ai-infrastructure",{"name":4593,"slug":4594,"type":15},"Cloudflare Workers","cloudflare-workers",{"name":4596,"slug":4597,"type":15},"SDK","sdk",{"name":4599,"slug":4600,"type":15},"Serverless","serverless","2026-04-27T05:34:19.800431",{"slug":4,"name":4,"fn":5,"description":6,"org":4603,"tags":4604,"stars":19,"repoUrl":20,"updatedAt":21},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4605,4606],{"name":17,"slug":18,"type":15},{"name":13,"slug":14,"type":15},{"slug":4608,"name":4608,"fn":4609,"description":4610,"org":4611,"tags":4612,"stars":19,"repoUrl":20,"updatedAt":4623},"cloudflare","manage Cloudflare platform resources","Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), networking (Tunnel, Spectrum), security (WAF, DDoS), and infrastructure-as-code (Terraform, Pulumi). Use for any Cloudflare development task.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4613,4614,4616,4619,4622],{"name":4590,"slug":4591,"type":15},{"name":4615,"slug":4608,"type":15},"Cloudflare",{"name":4617,"slug":4618,"type":15},"Database","database",{"name":4620,"slug":4621,"type":15},"Security","security",{"name":4599,"slug":4600,"type":15},"2026-04-27T05:34:21.032189",{"items":4625,"total":358},[4626,4634,4639],{"slug":4581,"name":4581,"fn":4582,"description":4583,"org":4627,"tags":4628,"stars":19,"repoUrl":20,"updatedAt":4601},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4629,4630,4631,4632,4633],{"name":4587,"slug":4588,"type":15},{"name":4590,"slug":4591,"type":15},{"name":4593,"slug":4594,"type":15},{"name":4596,"slug":4597,"type":15},{"name":4599,"slug":4600,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":4635,"tags":4636,"stars":19,"repoUrl":20,"updatedAt":21},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4637,4638],{"name":17,"slug":18,"type":15},{"name":13,"slug":14,"type":15},{"slug":4608,"name":4608,"fn":4609,"description":4610,"org":4640,"tags":4641,"stars":19,"repoUrl":20,"updatedAt":4623},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4642,4643,4644,4645,4646],{"name":4590,"slug":4591,"type":15},{"name":4615,"slug":4608,"type":15},{"name":4617,"slug":4618,"type":15},{"name":4620,"slug":4621,"type":15},{"name":4599,"slug":4600,"type":15}]