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
2
votes
0 answers

How to use events (Chrome-Developer-Tools) using Selenium with Python as a thread?

My current code is like that: # Note: driver variable allready initialzed (Chrome) import trio # async library that selenium uses import requests from PIL import Image from io import BytesIO def show_image(url): try: response =…
2
votes
1 answer

Cypress tests against devtools port only

We use some third party enterprise software ("Container App"), which has an embedded Chromium browser, in which our webapp runs. We use Cypress to test our webapp in a stand-alone browser outside of this container, however we would like to be able…
Jaqen H'ghar
  • 4,305
  • 2
  • 14
  • 26
2
votes
1 answer

Pupeteer execute command in Devtools Console

So I have an line which I can just paste manually into the Devtools Console in a browser. Is there any way to make pupeteer execute it? After searching I havent found anything, sorry if this has been answered already, I am quite new. For those who…
2
votes
1 answer

how to get DOM tree by 'chrome devtool protocol '

I don’t understand how to use this protocol(chrome devtool protocol) to get the entire DOM tree. My understanding of this protocol is not deep enough. If anyone knows how to get the DOM tree and tell me, I would be very grateful. Besides, if you can…
jenson
  • 31
  • 1
2
votes
1 answer

Get nodeIds of elements within iframe using chrome dev tools protocol

Chrome Devtools Protocol DOM.querySelectorAll returns all nodeIs of the elements in the html. But it does not return the id's of the iframe contents. Is there a way to get them ? const doc = await page._client.send('DOM.getDocument'); const result =…
Muthukumar
  • 8,679
  • 17
  • 61
  • 86
2
votes
0 answers

[Chrome Devtools Protocol]: Get Renderer Process ID through Devtools Protocol

Problem Description I am trying to get chromium renderer process id of chrome relative to specific tab(page, frame) using Devtools Protocol. I know there has chrome api[1] chrome.processes for doing such things(eg.…
2
votes
0 answers

How can I capture the render process with Puppeteer?

I want all screenshots and timestamps when page appearance changes so that I can replay the render process. I tried capture screenshots every x seconds with page.screenshot(),but it seems like the screenshots have been delayed.
2
votes
2 answers

Attach debugger to worker from chrome devtools extension

I was trying to intercept ws messages in my chrome devtools extension. This question helped me. This is exactly what I need, but the only problem is that it this works only if websocket messeages are sent from the page context (I guess because the…
2
votes
1 answer

[Selenium 4.0.0-beta-1]: how add event listeners in CDP

I've built and installed Selenium 4.0.0-beta-1 python wheel from source to test CDP functionalities. Specifically I would like to intercept requests using Fetch Domain protocol. I can enable the domain using Fetch.enable command, but I don't see how…
revy
  • 3,945
  • 7
  • 40
  • 85
2
votes
1 answer

Electron BrowserWindow cannot get response when debugger is attached

I'm writing an Electron app which creates a BrowserWindow. I want to capture a few requests sent to a server, I also want responses for there requests. Using Electron WebRequest api I can't get responses, so searched the web and found that I can…
2
votes
1 answer

Target.sendMessageToTarget is deprecated – how do I use the flattened style of the devtools protocol now?

Right now a command I am sending command to targets by wrapping the actual message into a Target.sendMessageToTarget message. I thought with the "flattened" version I would simply need to add sessionId as parameter in the requests, but that doesn't…
Wes
  • 3,978
  • 4
  • 24
  • 45
2
votes
2 answers

Cypress failed to make a connection to the Chrome DevTools Protocol: ECONNREFUSED at TCPConnectWrap.afterConnect

I'm simply trying to run some of the tests in the example folder under Integration and it will not run on Chrome. Runs on Electron and Edge but refuses to run on Chrome and throwing the attached error after unsuccessfully trying. My version of…
Nova
  • 273
  • 1
  • 5
  • 12
2
votes
1 answer

Chrome DevTools Protocol: How to unsubscribe Page.javascriptDialogOpening event

I am using the Chrome DevTools Protocol API functions to listen to the javascriptDialogOpening event. Below is the code. async navigate(url: URL, target: any) { const { Page } = target.connection; // Enable the required protocol features …
2
votes
2 answers

Chrome DevTools Protocol: How to get click event handler name of a Node

Problem I have a list of the same nodes that has the same handler or function attached to it. I need to click each and every interactive node present in the DOM (this is the functionality or requirement). I would like to skip the Node to be clicked…
2
votes
0 answers

Debugger.setPauseOnExceptions for Selenium debugging not working

To investigate Selenium test failures due to Javascript errors (in Google Chrome) I am running the tests locally (non-headless-ly) with the --auto-open-devtools-for-tabs command line option for Chrome in combination with the…
1 2
3
12 13