Questions tagged [chrome-devtools-protocol]

Questions about CDP (Chrome Devtools Protocol) that's used by many automation tools (like Puppeteer), libraries, wrappers. It's also used by Chrome's built-in devtools.

Chrome Devtools Protocol documentation: https://chromedevtools.github.io/devtools-protocol/

185 questions
1
vote
1 answer

When is the requestId equal to the loaderId in the Chrome DevTools Protocol?

I have a bunch of captured network requests originating from Google Chrome. The requests were captured with the requestWillBeSent callback, which has the following parameters: requestId: RequestId Request identifier. loaderId: LoaderId Loader…
slhck
  • 36,575
  • 28
  • 148
  • 201
1
vote
1 answer

Python Selenium 4.3 unable to get performace logs in Chromedriver with network data

I am trying to get the performance logs of Chromedriver to get access to all network data. The chromedriver is connecting to an Electron app. I tried all the solutions previously discussed here but none seem to work. caps =…
1
vote
1 answer

Chrome devtool shortcut for "Pause on Exceptions"?

In Chrome devtool source panel, there are 7 buttons, and all of them can be controlled by keyboard shortcuts except the last one " Pause on Exception", Is there any way I can active/deactivate this button by keyboard shortcut? I didn't find the…
1
vote
1 answer

Selenium 4 C# Chrome DevTools

I would like to intercept the error messages from network Fetch/XHR. Which method should I take or how can I make a connection and intercept this information? I know this is necessary code base: driver = new ChromeDriver(); …
1
vote
0 answers

How to connect to the CDP WebSocket server in Golang?

I want to send CDP commands to WebSocket server exposed by chrome browser. For example, I create a new session on selenium and get WebSocket url as -> ws://172.20.10.2:4444/session/335d5805e9d98f3c37af004fa91e0f6e/se/cdp Now I want to send CDP…
1
vote
1 answer

Chrome DevTools Protocol - What Domains Available for Target

tl;dr: Is there a reflective/introspective mechanism to query live objects for their capabilities? The protocol is vast, but certain parts only apply to certain types of targets (e.g. 'Page.captureScreenshot' will fail on an iframe target). At…
Sean DeNigris
  • 6,306
  • 1
  • 31
  • 37
1
vote
1 answer

Run cdp commands on Selenium C#

Selenium seems to have a method driver.execute_cdp_cmd but I cannot find any executeCdpCommand for Chrome web driver in C# version of selenium library, Anyone knows where or how we can run such commands like the below code in python (I want the same…
1
vote
0 answers

Uncaught TypeError: Cannot read properties of undefined (reading 'network')

I'm currecntly working on a chrome extension and I need to access requests in network tab. Found the API called devtools.network. Tried to use it, but It threw an error like this: content.js:1 Uncaught TypeError: Cannot read properties of undefined…
Karafakeu
  • 23
  • 6
1
vote
1 answer

Chrome DevTools Protocol using Boost Beast

I`m trying to use a web socket client that connects to a server using Boost library. The situation is that the server sometimes sends pre-determined amounts of JSON messages, but sometimes more. From stack overflow I have a solution posted by @sehe,…
Mecanik
  • 1,539
  • 1
  • 20
  • 50
1
vote
1 answer

How to grant permissions of geolocation from devtools protocol monitor

I try to set permission but nothing happends. I insert this code to devtools protocol monitor { "command":"Browser.grantPermissions", "parameters": { "permissions": ["geolocation"] } }
Mr Dobish
  • 11
  • 2
1
vote
0 answers

Chrome extension: devtools protocol timeout

My extn uses the devtools protocol (debugger permission); after it has attached the debugger - it needs to stay attached indefinitely, to monitor changes on the attached to tab, etc. Keeping it running overnight turned out that after some period of…
avalanche1
  • 3,154
  • 1
  • 31
  • 38
1
vote
1 answer

Selenium DevToolsProtocol setUserAgentOverride

I'm trying to change "accept-language" header for selenium bot. As i find out there are 2 opportunities to do this: https://chromedevtools.github.io/devtools-protocol/tot/Emulation/#method-setUserAgentOverride and…
imka
  • 53
  • 3
1
vote
1 answer

Error: Protocol error (Fetch.continueRequest): Invalid InterceptionId

I am using Puppeteer and chrome dev tools to intercept network responses and modify them if necessary. I use the following code. const client = page._client; await client.send("Fetch.enable", { patterns: [{ requestStage: "Response"…
Muthukumar
  • 8,679
  • 17
  • 61
  • 86
1
vote
0 answers

Is it possible in chrome devtools to lock some layer of DOM that won't be selectable when inspecting DOM without removing or hiding it?

In many drawing software/app, you can lock a layer so it's not annoying when you try to use your mouse to pick some element/shape inside it. However, I'm encountering the same problem with my chrome devtools. Especially when dealing with SVG…
AGamePlayer
  • 7,404
  • 19
  • 62
  • 119
1
vote
1 answer

Target domain events not firing?

Why do the Target domain events not fire? There is not supposed to be a Target.enable method but for some reason it still does not work. The Target.createTarget method does work though. const CDP = require("chrome-remote-interface"); async function…