A high-level API to control headless Chrome and Firefox browsers over the DevTools Protocol and WebDriver BiDi
94
Build a custom transport layer that wraps a Puppeteer browser connection and logs all Chrome DevTools Protocol (CDP) messages exchanged between the browser and the automation script.
Your implementation should provide a way to:
SEND: {method: "...", params: {...}}RECV: {id: ..., result: {...}} or RECV: {method: "...", params: {...}}Page.navigate @test@generates
/**
* Creates a custom transport that logs CDP traffic
*
* @param {string} browserWSEndpoint - WebSocket endpoint URL for the browser
* @returns {Promise<ConnectionTransport>} A transport implementation that logs all CDP messages
*/
async function createLoggingTransport(browserWSEndpoint) {
// IMPLEMENTATION HERE
}
module.exports = { createLoggingTransport };Provides browser automation and transport interfaces.
Install with Tessl CLI
npx tessl i tessl/npm-puppeteer-coredocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10