Remix.run Logo
giorgioz 3 hours ago

Can anyone tell me some use cases for CDP commands?

In which situation is preferable to use CDP commands over Puppeteer?

gwittel an hour ago | parent | next [-]

Tools like Playwright and Puppeteer are abstractions on top of CDP. The other use case is when these frameworks don’t expose or don’t use a CDP command you need (often they hide some parameters for cross browser compatibility).

Webdriver BiDi is a future cross browser replacement:

https://www.w3.org/TR/webdriver-bidi/

youngtaff 16 minutes ago | parent [-]

Bidi’s not a viable replacement for some use-cases e.g. setting headers for just the main origin as it’s add header command adds the header to all requests potentially causing CORS issues

youngtaff 19 minutes ago | parent | prev [-]

Some things you can only do via CDP — last time I looked adding a HTTP header to requests that match a certain URL was only possible via CDP