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
4
votes
1 answer

NodeJS - Error: connect ECONNREFUSED 127.0.0.1:port (chrome-remote-interface)

I made a script using chrome-launcher and chrome-remote-interface to save a webpage to pdf using Chrome. It works without any issue on my Windows machine, but when I try it on CentOS 7, I obtain the following error and I can't figure out why. Both…
4
votes
1 answer

Selenium 3 python: add listener for Chrome DevTools network event

I am using Selenium 3 with python. Currently it is possible to send a Chrome DevTools command using the execute_cdp_cmd binding: from selenium import webdriver driver = webdriver.Chrome() response = driver.execute_cdp_cmd('Network.getAllCookies',…
4
votes
1 answer

Correct way to get response body of XHR requests generated by a page with RStudio Chromote

I'd like to use Chromote to gather the response body of the XHR calls made by a website, but I find the API a bit complex to master, especially the async pipeline. I guess I need to first enable the Network functionality and then load the page (this…
Bakaburg
  • 3,165
  • 4
  • 32
  • 64
4
votes
3 answers

Read DOMStorage / LocalStorage via Chrome DevTools Protocol

I know the following code snippet allows me to read all current cookies: let Main = await import('./main/main.js'); await Main.MainImpl.sendOverProtocol('Network.getCookies'); Now, for testing purposes, I need to get all available LocalStorage…
4
votes
0 answers

Use devtools extensions with Chrome's remote devtools using --remote-debugging-port

I am using Chromium's --remote-debugging-port flag in an electron app to remotely access the Devtools on a port. I want to use the React Devtools extension along with these Devtools. If I use Electron's API for installing the Devtools extension and…
4
votes
0 answers

Recording binary WebSocket data using Puppeteer

I'm trying to record realtime data that is streamed through a WebSocket using Puppeteer. I've followed the instructions on How to use puppeteer to dump WebSocket data, but haven't had any luck so far. The Network.webSocketFrameReceived callback is…
Checksum
  • 3,220
  • 3
  • 23
  • 24
3
votes
0 answers

Storing network request Captured using chrome dev tools in a map

I have one query in Selenium 4. Chrome exposed devtools and we are able to get network request response header as shown below, but as "addListener" method accept 2nd param as Consumer Interface so is it possible to store the headers we are printing…
Amit Jain
  • 4,389
  • 2
  • 18
  • 21
3
votes
1 answer

Capture requests (XHR, JS, CSS) from embedded iframes using devtool protocol

For the context, I am developing a synthetic monitoring tool using Nodejs and puppeteer. For each step of a defined scenario, I capture a screenshot, a waterfall and performance metrics. My problem is on the waterfall, I previously used puppeter-har…
3
votes
0 answers

How can I receive events for an embedded iframe using Chrome Devtools Protocol?

I am attempting to use Chrome Devtools Protocol to list the network and log events for a tab. I am successful in doing so for the top level frame, but am struggling with children iframes. When I have an iframe that is the same domain as the parent,…
sb8244
  • 152
  • 10
3
votes
1 answer

Automate Chrome request blocking using Selenium-webdriver for python?

Can I automate Chrome request blocking using Selenium-webdriver for python? Python,Selenium,ChromeDriver,Chrome Devtool protocol. 1# from selenium import webdriver 2# driver = webdriver.Chrome() 3# driver.execute_cdp_cmd('Network.setBlockedURLs',…
3
votes
1 answer

Getting Cypress to run Headless Electron with Chrome DevTools Protocol

Cypress version ^3.8.3 Using Chrome I am able to setup and attached to the Remote Debugging Port. In cypress/plugins/index.js if (browser.name === "chrome") { args.push("--remote-debugging-port=9222"); return args; } When…
3
votes
0 answers

About System time in Chrome dev tools

What is the difference between System time and Others time in the Summery pie chart of Performance Tab of Chrome dev tools and what does specially System time refers to ?
2
votes
0 answers

chrome-remote-interface: CDP is not a function

In an electron project, I want to acces a running chrome instance in order to open some sites, that I cannot open via command line (i.e. chrome://inspect). I tested the code on my machine locally and it works, when executed in the main-process of…
2
votes
1 answer

Chrome DevTools Protocol: available domains per target type?

What is the best way to determine which CDP domains are available for a specific Target type? For example, Network domain is not available in the browser targets, but can be used in page sessions. Getting started with CDP provides a link to chromium…
muodov
  • 573
  • 6
  • 8
2
votes
0 answers

Websocket from Chrome Extension to Chrome Debugger

I am writing a plugin for Chrome (manifest v3). It should create a WebSocket connection between the Service Worker and the Chrome Debugger, so that I can control a page with puppeteer. const browserDebugger = await ( await…
1
2
3
12 13