w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
336 stars 35 forks source link

Support ResourceType in network requests #704

Open OrKoN opened 2 months ago

OrKoN commented 2 months ago

CDP exposes Network.ResourceType which indicates what kind of resource is being loaded https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-ResourceType

This type of information is commonly exposed in browser DevTools and, for example, Puppeteer also exposes it to the users so that users can perform analysis and interception based on the resource type detected by the browser.

The resourceType partially matches https://fetch.spec.whatwg.org/#concept-request-destination

OrKoN commented 2 months ago

Related https://github.com/w3c/webdriver-bidi/issues/698

OrKoN commented 2 months ago

ResourceType vs request destination https://docs.google.com/spreadsheets/d/15nwWRnflDT8ZuoEjRbu1xqhLDXReBc4y_hV3mrQo-VE/edit?usp=sharing