chrome-debugging

1.2.6 • Public • Published

chrome-debugging

Chrome DevTools Protocol.

npm i chrome-debugging

Cache built-in by target id, common helpers, and easy to use.

Usage

const ChromeDebugging = require('chrome-debugging')

const chrome = new ChromeDebugging({ port: 9230 })
const targets = await chrome.list({ ignoreProtocols: ['devtools'] })

for (const target of targets) {
  const tab = await chrome.use(target.id)

  // const { DOM, CSS, Page, Runtime } = tab
  console.log(await tab.$('*'))

  // await tab.close()
}

await chrome.destroy()

It uses chrome-remote-interface internally.
I.e. tab has several properties, methods, etc as the original "CDP client".

License

MIT

/chrome-debugging/

    Package Sidebar

    Install

    npm i chrome-debugging

    Weekly Downloads

    0

    Version

    1.2.6

    License

    MIT

    Unpacked Size

    6.31 kB

    Total Files

    4

    Last publish

    Collaborators

    • lukks