1"use strict";(self.webpackChunkplaywright_dev=self.webpackChunkplaywright_dev||[]).push([["3556"],{45220(e,s,d){d.r(s),d.d(s,{metadata:()=>r,default:()=>a,frontMatter:()=>t,contentTitle:()=>l,toc:()=>h,assets:()=>c});var r=JSON.parse('{"id":"capabilities","title":"Command Reference","description":"Every command below is always available \u2014 unlike MCP, the CLI has no capability","source":"@site/agent-cli/capabilities.mdx","sourceDirName":".","slug":"/capabilities","permalink":"/agent-cli/capabilities","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Command Reference"},"sidebar":"agentCli","previous":{"title":"Snapshots","permalink":"/agent-cli/snapshots"},"next":{"title":"Vision Mode","permalink":"/agent-cli/vision-mode"}}'),n=d(74848),i=d(28453);let t={title:"Command Reference"},l="Command Reference",c={},h=[{value:"Core",id:"core",level:2},{value:"Navigation",id:"navigation",level:2},{value:"Keyboard",id:"keyboard",level:2},{value:"Mouse",id:"mouse",level:2},{value:"Save as",id:"save-as",level:2},{value:"Tabs",id:"tabs",level:2},{value:"Storage",id:"storage",level:2},{value:"Network",id:"network",level:2},{value:"DevTools",id:"devtools",level:2},{value:"Install",id:"install",level:2},{value:"Browser sessions",id:"browser-sessions",level:2},{value:"Global options",id:"global-options",level:2}];function o(e){let s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"command-reference",children:"Command Reference"})}),"\n",(0,n.jsxs)(s.p,{children:["Every command below is always available \u2014 unlike ",(0,n.jsx)(s.a,{href:"/mcp/introduction",children:"MCP"}),", the CLI has no capability\ngating. The groups match the ones printed by ",(0,n.jsx)(s.code,{children:"playwright-cli --help"}),"; use\n",(0,n.jsx)(s.code,{children:"playwright-cli --help <command>"})," for the exact arguments and options of a single command."]}),"\n",(0,n.jsxs)(s.p,{children:["Arguments in ",(0,n.jsx)(s.code,{children:"<angle brackets>"})," are required, arguments in ",(0,n.jsx)(s.code,{children:"[square brackets]"})," are optional."]}),"\n",(0,n.jsx)(s.h2,{id:"core",children:"Core"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Command"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"open [url]"})}),(0,n.jsx)(s.td,{children:"Open the browser, optionally navigating to a URL"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"attach [name]"})}),(0,n.jsx)(s.td,{children:"Attach to a running Playwright browser"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"close"})}),(0,n.jsx)(s.td,{children:"Close the browser"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"detach"})}),(0,n.jsx)(s.td,{children:"Detach from an attached browser, leaving it running"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"goto <url>"})}),(0,n.jsx)(s.td,{children:"Navigate to a URL"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"type <text>"})}),(0,n.jsx)(s.td,{children:"Type text into the focused editable element"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"click <target> [button]"})}),(0,n.jsx)(s.td,{children:"Click an element"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"dblclick <target> [button]"})}),(0,n.jsx)(s.td,{children:"Double-click an element"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"fill <target> <text>"})}),(0,n.jsx)(s.td,{children:"Fill text into an editable element"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"drag <startTarget> <endTarget>"})}),(0,n.jsx)(s.td,{children:"Drag and drop between two elements"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"drop <target>"})}),(0,n.jsx)(s.td,{children:"Drop files or data onto an element from outside the page"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"hover <target>"})}),(0,n.jsx)(s.td,{children:"Hover over an element"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"select <target> <val>"})}),(0,n.jsx)(s.td,{children:"Select an option in a dropdown"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"upload <files...>"})}),(0,n.jsx)(s.td,{children:"Upload one or more files"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"check <target>"})," / ",(0,n.jsx)(s.code,{children:"uncheck <target>"})]}),(0,n.jsx)(s.td,{children:"Check or uncheck a checkbox or radio button"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"snapshot [target]"})}),(0,n.jsx)(s.td,{children:"Capture a page snapshot to obtain element refs"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"find [text]"})}),(0,n.jsx)(s.td,{children:"Search the page snapshot, returning matches with context"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"eval <func> [target]"})}),(0,n.jsx)(s.td,{children:"Evaluate JavaScript on the page or an element"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"dialog-accept [prompt]"})," / ",(0,n.jsx)(s.code,{children:"dialog-dismiss"})]}),(0,n.jsx)(s.td,{children:"Handle a dialog"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"resize <w> <h>"})}),(0,n.jsx)(s.td,{children:"Resize the browser window"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"delete-data"})}),(0,n.jsx)(s.td,{children:"Delete the session's user data"})]})]})]}),"\n",(0,n.jsxs)(s.p,{children:["See ",(0,n.jsx)(s.a,{href:"/agent-cli/commands/interaction",children:"Interaction"}),", ",(0,n.jsx)(s.a,{href:"/agent-cli/commands/navigation",children:"Navigation"})," and\n",(0,n.jsx)(s.a,{href:"/agent-cli/commands/dialogs",children:"Dialogs"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"navigation",children:"Navigation"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Command"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"go-back"})}),(0,n.jsx)(s.td,{children:"Go back to the previous page"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"go-forward"})}),(0,n.jsx)(s.td,{children:"Go forward to the next page"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"reload"})}),(0,n.jsx)(s.td,{children:"Reload the current page"})]})]})]}),"\n",(0,n.jsx)(s.h2,{id:"keyboard",children:"Keyboard"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Command"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"press <key>"})}),(0,n.jsxs)(s.td,{children:["Press a key, e.g. ",(0,n.jsx)(s.code,{children:"Enter"})," or ",(0,n.jsx)(s.code,{children:"ArrowLeft"})]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"key
1down <key>"})," / ",(0,n.jsx)(s.code,{children:"keyup <key>"})]}),(0,n.jsx)(s.td,{children:"Press a key down or release it"})]})]})]}),"\n",(0,n.jsx)(s.h2,{id:"mouse",children:"Mouse"}),"\n",(0,n.jsx)(s.p,{children:"Coordinate-based interaction using pixel positions from screenshots. Useful for canvas apps, maps,\nand custom widgets without accessible elements."}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Command"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"mousemove <x> <y>"})}),(0,n.jsx)(s.td,{children:"Move the mouse to coordinates"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"mousedown [button]"})," / ",(0,n.jsx)(s.code,{children:"mouseup [button]"})]}),(0,n.jsx)(s.td,{children:"Press or release a mouse button"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"mousewheel <dx> <dy>"})}),(0,n.jsx)(s.td,{children:"Scroll with the mouse wheel"})]})]})]}),"\n",(0,n.jsxs)(s.p,{children:["See ",(0,n.jsx)(s.a,{href:"/agent-cli/vision-mode",children:"Vision Mode"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"save-as",children:"Save as"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Command"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"screenshot [target]"})}),(0,n.jsx)(s.td,{children:"Screenshot of the page or an element"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"pdf"})}),(0,n.jsx)(s.td,{children:"Save the page as PDF"})]})]})]}),"\n",(0,n.jsxs)(s.p,{children:["See ",(0,n.jsx)(s.a,{href:"/agent-cli/commands/screenshots-pdf",children:"Screenshots & PDF"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"tabs",children:"Tabs"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Command"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"tab-list"})}),(0,n.jsx)(s.td,{children:"List all tabs"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"tab-new [url]"})}),(0,n.jsx)(s.td,{children:"Create a new tab"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"tab-close [index]"})}),(0,n.jsx)(s.td,{children:"Close a tab (the current one if no index)"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"tab-select <index>"})}),(0,n.jsx)(s.td,{children:"Switch to a tab"})]})]})]}),"\n",(0,n.jsxs)(s.p,{children:["See ",(0,n.jsx)(s.a,{href:"/agent-cli/commands/tabs",children:"Tabs"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"storage",children:"Storage"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Command"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"state-save [filename]"})," / ",(0,n.jsx)(s.code,{children:"state-load <filename>"})]}),(0,n.jsx)(s.td,{children:"Save or restore browser storage state"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"cookie-list"}),", ",(0,n.jsx)(s.code,{children:"cookie-get"}),", ",(0,n.jsx)(s.code,{children:"cookie-set"}),", ",(0,n.jsx)(s.code,{children:"cookie-delete"}),", ",(0,n.jsx)(s.code,{children:"cookie-clear"})]}),(0,n.jsx)(s.td,{children:"Manage cookies"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"localstorage-list/get/set/delete/clear"})}),(0,n.jsx)(s.td,{children:"Manage localStorage"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"sessionstorage-list/get/set/delete/clear"})}),(0,n.jsx)(s.td,{children:"Manage sessionStorage"})]})]})]}),"\n",(0,n.jsxs)(s.p,{children:["See ",(0,n.jsx)(s.a,{href:"/agent-cli/commands/storage",children:"Storage & Authentication"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"network",children:"Network"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Command"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"requests"})}),(0,n.jsxs)(s.td,{children:["List network requests, numbered for use with ",(0,n.jsx)(s.code,{children:"request"})]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"request <index>"})}),(0,n.jsx)(s.td,{children:"Full details of a single request"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"request-headers <index>"})," / ",(0,n.jsx)(s.code,{children:"request-body <index>"})]}),(0,n.jsx)(s.td,{children:"One part of the request"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"response-headers <index>"})," / ",(0,n.jsx)(s.code,{children:"response-body <index>"})]}),(0,n.jsx)(s.td,{children:"One part of the response"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"route <pattern>"})}),(0,n.jsx)(s.td,{children:"Mock requests matching a URL pattern"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"route-list"})}),(0,n.jsx)(s.td,{children:"List active routes"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"unroute [pattern]"})}),(0,n.jsx)(s.td,{children:"Remove matching routes, or all of them"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"network-state-set <state>"})}),(0,n.jsx)(s.td,{children:"Set the browser online or offline"})]})]})]}),"\n",(0,n.jsxs)(s.p,{children:["See ",(0,n.jsx)(s.a,{href:"/agent-cli/commands/network-routing",children:"Network & Mocking"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"devtools",children:"DevTools"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Command"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"console [min-level]"})}),(0,n.jsx)(s.td,{children:"List console messages"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"run-code [code]"})}),(0,n.jsx)(s.td,{children:"Run a Playwright code snippet"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"recording-start"})," / ",(0,n.jsx)(s.code,{children:"recording-stop"})]}),(0,n.jsx)(s.td,{children:"Record user actions and print them as Playwright code"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"tracing-start"})," / ",(0,n.jsx)(s.code,{children:"tracing-stop"})]}),(0,n.jsx)(s.td,{children:"Record an execution trace"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"video-start [filename]"})," / ",(0,n.jsx)(s.code,{children:"video-stop"})]}),(0,n.jsx)(s.td,{children:"Record a video"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"video-chapter <title>"})}),(0,n.jsx)(s.td,{children:"Add a chapter marker to the video"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"video-show-actions"})," / ",(0,n.jsx)(s.code,{children:"video-hide-actions"})]}),(0,n.jsx)(s.td,{children:"Annotate actions in the recorded video"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"show"})}),(0,n.jsx)(s.td,{children:"Open the Playwright dashboard"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"pause-at <location>"}),", ",(0,n.jsx)(s.code,{children:"resume"}),", ",(0,n.jsx)(s.code,{children:"step-over"})]}),(0,n.jsx)(s.td,{children:"Control a paused test"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"generate-locator <target>"})}),(0,n.jsx)(s.td,{children:"Generate a Playwright locator for an element"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"highlight [target]"})}),(0,n.jsx)(s.td,{children:"Show or hide a highlight overlay on the page"})]})]})]}),"\n",(0,n.jsxs)(s.p,{children:["See ",(0,n.jsx)(s.a,{href:"/agent-cli/commands/console-eval",children:"Console & Eval"}),", ",(0,n.jsx)(s.a,{href:"/agent-cli/commands/codegen",children:"Codegen & Highlighting"}),",\n",(0,n.jsx)(s.a,{href:"/agent-cli/commands/tracing",children:"Tracing"}),", ",(0,n.jsx)(s.a,{href:"/agent-cli/commands/video-recording",children:"Video Recording"})," and\n",(0,n.jsx)(s.a,{href:"/agent-cli/commands/test-debugging",children:"Test Debugging"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"install",children:"Install"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Command"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"install"})}),(0,n.jsx)(s.td,{children:"Initialize the workspace, optionally installing skills"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"install-browser [browser]"})}),(0,n.jsx)(s.td,{children:"Install a browser"})]})]})]}),"\n",(0,n.jsxs)(s.p,{children:["See ",(0,n.jsx)(s.a,{href:"/agent-cli/installation",children:"Installation"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"browser-sessions",children:"Browser sessions"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Command"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"list"})}),(0,n.jsx)(s.td,{children:"List browser sessions"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"close-all"})}),(0,n.jsx)(s.td,{children:"Close all browser sessions"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"kill-all"})}),(0,n.jsx)(s.td,{children:"Forcefully kill stale or zombie browser processes"})]})]})]}),"\n",(0,n.jsxs)(s.p,{children:["See ",(0,n.jsx)(s.a,{href:"/agent-cli/sessions",children:"Sessions & Dashboard"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"global-options",children:"Global options"}),"\n",(0,n.jsx)(s.p,{children:"These apply to every command and can be placed anywhere on the command line."}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Option"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"-s=<name>"}),", ",(0,n.jsx)(s.code,{children:"--session=<name>"})]}),(0,n.jsx)(s.td,{children:"Run against a named browser session"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"--raw"})}),(0,n.jsx)(s.td,{children:"Print only the result value, without page status, generated code, or snapshot"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"--json"})}),(0,n.jsx)(s.td,{children:"Wrap the whole reply as JSON"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"--help [command]"})}),(0,n.jsx)(s.td,{children:"Print help"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"--version"})}),(0,n.jsx)(s.td,{children:"Print the version"})]})]})]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-bash",children:"# pipe a value straight into another tool\nplaywright-cli --raw eval \"JSON.stringify(performance.timing)\" | jq '.loadEventEnd - .navigationStart'\nplaywright-cli --raw snapshot > before.yml\n\n# structured output for scripting\nplaywright-cli list --json\n"})})]})}function a(e={}){let{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(o,{...e})}):o(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.