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

page.exposeFunction with Chrome DevTools Protocol?

How can I implement page.exposeFunction from puppeteer with Chrome DevTools Protocol? I checked the sourcecode of puppeteer but was not able to understand it.
1
vote
0 answers

Does clearing browser cache clear both disk and memory cache?

I'm developing an electron application that uses a combo of the electron API and devtools protocol for browser automation. I'm running into an issue where javascript files are being retrieved from memory cache on page reload even after clearing the…
1
vote
0 answers

Programatically accessing chrome devtools network API from javascript

As described in the documentation the performance metrics can be fetched using the navigation and resource timings API. I've had varying levels of success using the PerformanceObserver as shown in the webdev tutorials. However, I was either unable…
1
vote
1 answer

How to use Page.startScreencast command of Chrome DevTools Protocol in electron to record as image or video?

I want to record my electron app's content using Page.startScreencast command of Chrome DevTools Protocol? Could not find out any exmaple use. How can achieve this?
Alok
  • 7,734
  • 8
  • 55
  • 100
1
vote
1 answer

Monitoring headless Chrome

I'm using Chrome in headless mode via CDP (Chrome devtools protocol) to do HTML to PDF conversions. Works well but I do not trust Chrome to run forever and want to build a guardian service to monitor its responsiveness and if necessary kill the…
Peter Wone
  • 17,965
  • 12
  • 82
  • 134
1
vote
0 answers

Chrome DevTools: Is there any way to calculate Queuing Time using the Network API?

Using the Chrome DevTools Network API events, what is the formula to calculate queuing time? Here is some more information about queuing time from this source:
aBlaze
  • 2,436
  • 2
  • 31
  • 63
1
vote
0 answers

C#: Issue with Opera 58.x | operadriver 2.42 | Selenium 3.141 - Opera not reachable

I've been doing product development and testing for the past 10 years and took over our company's R&D selenium testing for one of our products a couple years ago. I'm in the process of updating our C# test framework that tests our product's…
1
vote
1 answer

what makes an execution context the "default" one?

In Chrome's Puppeteer, at ExecutionContextDescription.auxData you can find an object containing the following properties: isDefault, type and frameId frameId is fairly straightforward to understand, but the other properties doesn't seem documented…
Wes
  • 3,978
  • 4
  • 24
  • 45
1
vote
0 answers

DOMDebugger.getEventListeners doesn't return backendNodeId

I followed the doc https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger/#method-getEventListeners to try DOMDebugger.getEventListeners. I can get the array of event listeners but there is no backendNodeId in each object. But I need the…
1
vote
1 answer

How to click on element with Chrome DevTools Protocol?

I'm using chromote R package and I'm testing it with shiny application. I'm trying to click on the icon that should duplicate few select elements. But all I have is tooltip when I take a screenshot and if I open the browser it freezes the R…
jcubic
  • 61,973
  • 54
  • 229
  • 402
1
vote
0 answers

Chrome DevTolls protocol's Fetch.enable does not cause all requests to be intercepted

I issue a message like this via DevTools Protocol to a running Google Chrome instance: { "id": 0, "method": "Fetch.enable", "params": { "patterns": [{ "urlPattern": "*.js*", "resourceType":…
ed22
  • 1,127
  • 2
  • 14
  • 30
1
vote
0 answers

DevTools failed to load SourceMap: Could not load content for file:///path/to/source.js.map

When I run a Node.js typescript project with --inspect then I go to URL "localhost:9229/json/list" and select URL "devtoolsFrontendUrlCompat" (NOTE: need to remove "chrome-" from thr start of URL as GOOGLE chrome team again MESSED UP the URL else it…
1
vote
0 answers

How to listen available debug targets change in change chrome extension

I'm building a Chrome extension. I've got all targets by the method of chrome.debugger.getTargets, and I want to listen this targets change event.then I found Target.setDiscoverTargets, so I try to use following code. chrome.debugger.attach({…
1
vote
1 answer

Maximum number of breakpoints with puppeteer?

Does anyone know what the limit is on the maximum number of breakpoints that can be set with Puppeteer? I will collect all stacktraces when debugger is hit these breakpoints with Debugger.paused event.
1
vote
1 answer

Get Javascript reference to element with only backendNodeId from Devtools protocol

I want to be able to mouse over a page, have it highlight the elements underneath the cursor (in the same way as the developer tools inspector), and when I click on the mouse obtain the XPath for the element. Enabling the element inspector and…