### GET /json/protocol/ Response (partial) Source: https://chromedevtools.github.io/devtools-protocol The current devtools protocol, as JSON. This is a partial example. ```json { "domains": [ { "domain": "Accessibility", "experimental": true, "dependencies": [ "DOM" ], "types": [ { "id": "AXValueType", "description": "Enum of possible property types.", "type": "string", "enum": [ "boolean", "tristate", // ... ``` -------------------------------- ### Sending commands from the DevTools console Source: https://chromedevtools.github.io/devtools-protocol Examples of sending commands to the DevTools protocol from the console, including capturing a screenshot and overriding device metrics. ```javascript let Main = await import('./devtools-frontend/front_end/entrypoints/main/main.js'); // or './entrypoints/main/main.js' or './main/main.js' depending on the browser version await Main.MainImpl.sendOverProtocol('Emulation.setDeviceMetricsOverride', { mobile: true, width: 412, height: 732, deviceScaleFactor: 2.625, }); const data = await Main.MainImpl.sendOverProtocol("Page.captureScreenshot"); ``` -------------------------------- ### GET /json/version Response Source: https://chromedevtools.github.io/devtools-protocol Browser version metadata returned by the /json/version endpoint. ```json { "Browser": "Chrome/72.0.3601.0", "Protocol-Version": "1.3", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3601.0 Safari/537.36", "V8-Version": "7.2.233", "WebKit-Version": "537.36 (@cfede9db1d154de0468cb0538479f34c0755a0f4)", "webSocketDebuggerUrl": "ws://localhost:9222/devtools/browser/b0b8a4fb-bb17-4359-9533-a8d9f3908bd8" } ``` -------------------------------- ### CSS.forcePseudoState Parameters Source: https://chromedevtools.github.io/devtools-protocol/tot/CSS Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser. ```json { "nodeId": "DOM.NodeId", "pseudoClasses": [ "string" ] } ``` -------------------------------- ### GET /json or /json/list Response Source: https://chromedevtools.github.io/devtools-protocol A list of all available websocket targets returned by the /json or /json/list endpoint. ```json [ { "description": "", "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:9222/devtools/page/DAB7FB6187B554E10B0BD18821265734", "id": "DAB7FB6187B554E10B0BD18821265734", "title": "Yahoo", "type": "page", "url": "https://www.yahoo.com/", "webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/DAB7FB6187B554E10B0BD18821265734" } ] ```