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

Accessing chrome devtools protocol in docker grid

My tests are running against a docker grid with selenium docker images for hub and chrome. What I am trying to do is access chrome devtools protocols in the chrome node so that I can access/intercept a request.Any help is appreciated I was able to…
2
votes
1 answer

What's the most reliable way to programmatically control a Chromium instance?

I'm researching reliable ways to programmatically control instances of Chrome/Chromium to leverage its capabilities of rendering web pages in Node.js/C#/Java application. In short, things I want to do are as follows: Open/close a browser…
2
votes
1 answer

Is there a way to run a Lighthouse audit using the Chrome DevTools protocol?

I would like to run a Lighthouse audit programatically. I have found multiple examples on how to accomplish this with Puppeteer. However, is there a way to run a Lighthouse audit using the Chrome DevTools Protocol?
aBlaze
  • 2,436
  • 2
  • 31
  • 63
2
votes
1 answer

How to modify request headers using Puppeteer & Chrome DevTools Protocol? (Possibly a JS syntax issue)

I have the following Typescript function that assumes a Chrome browser has already been launched using Puppeteer. The documentation for the Fetch functions used below can be found here. async function modify(client: CDPSession) { …
aBlaze
  • 2,436
  • 2
  • 31
  • 63
2
votes
1 answer

Can Selenium WebDriver (java) interact with the Browser's inspect tool element selector?

By using selenium, can I access the browsers element picker (Ctrl + Shift + C, in the browser) that is located in the inspect tab? I want to "point" to an element using that picker and have it be high lighted in the browser. For example, something…
2
votes
0 answers

Network.getResponseBody via Websocket API

I'm wondering if anyone might have any experience with Chrome Devtools Protocol via Websocket API, specifically with regards to extracting the Network response bodies in real time. I've taken a look at…
1
vote
0 answers

How can I use the puppeteer devtools protocol to find all media queries that did not match the current element?

I want to use the puppeteer devtools protocol to do the following, given an element (i.e., its nodeId), I would like to know what media queries did not apply to the current element, but could have (e.g if it was larger/smaller/etc.)
Foobar
  • 7,458
  • 16
  • 81
  • 161
1
vote
0 answers

How to get the resource loading time of a specific resource through CDP protocol or the console of DevTools?

How to get the resource loading time of a specific resource through CDP protocol or the console of DevTools? I can obtain the load time of resources in the following way, but this should only correspond to the load from cache time in the above…
1
vote
1 answer

How to fetch Payload of a network call using selenium 4 - Chrome dev Tools? (Java)

I want to fetch the Payload part of a network call using selenium 4 Chrome dev Tools concept. I use selenium with java - eclipse as ide and Maven as run time environment. Want to know the Command that is used to fetch network payload
1
vote
0 answers

How can we mock an HTTP response using Chrome Dev Tools with Selenium 4 using C#?

I can do this using Fetch commands in Java but I am not able to do it using C#. Does anyone has some sample snippet? IDevTools devTools = driver as IDevTools; var session = devTools.GetDevToolsSession(); var domains =…
ashutosh
  • 45
  • 4
1
vote
0 answers

How to disable "Headless" mode in Geyizor?

I have the following code and I am try to understand how to add some options : func main() { // r := client.NewClient(&client.Options{AllocatorOptions: []chromedp.ExecAllocatorOption{ // chromedp.Headless, // }), var buf []byte …
SonyMag
  • 141
  • 7
1
vote
1 answer

how can i launch chrome using selenium web driver in python not as a guest but as my chrome profile?

I do the following options = webdriver.ChromeOptions() options.add_argument("user-data-dir=C:/Users/bagher/AppData/Local/Google/Chrome/User Data") options.add_argument('--profile-directory=Profile 1') #Path to your chrome profile driver =…
1
vote
1 answer

Using DevTools features with Selenium Grid on Docker

I managed to work with DevTools features in Selenium 4 locally, but when I tried to use it on Selenium Grid, it didn't work. In order to investigate it, I installed a local grid with one Chrome node using docker-compose and I got the same…
1
vote
1 answer

HTTPRequests are lost/missing when using Puppeteer with setRequestInterception enabled

Here's the scoop. I'm trying to use Puppeteer v18.0.5 with the bundled chromium browser against a specific website. I'm using Node v16.16.0 However, when I enable request interception via page.setRequestInterception(true), all of the HTTPRequests…
1
vote
1 answer

How to send messages to Firefox through devtools protocol?

i'm trying to write my own custom webdriver interface to control firefox through chrome devtools protocol (cdp). i launch firefox using firefox-esr --remote-debugging-port 0 and then it creates a websocket that i connect to using python: async def…