devtools
A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using Puppeteer
Last updated 2 years ago by wdio-user .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install devtools 
SYNC missed versions from official npm registry.

DevTools

A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using Puppeteer

This package provides a low level interface to run browser automation scripts based on the WebDriver protocol. If you are looking for a tool to automate Chrome or Firefox you should look up Puppeteer. This is suppose to be used by the WebdriverIO package in order to run its automation on the Chrome DevTools protocol.

Install

npm i webdriverio

Example

The following example demonstrates how WebdriverIO can be used with the devtools package as automation binding using the automationProtocol option:

import { remote } from 'webdriverio'

const browser = await remote({
    automationProtocol: 'devtools',
    capabilities: {
        browserName: 'chrome',
        'wdio:devtoolsOptions': {
            headless: true
        }
    }
})

await browser.url('https://webdriver.io')

/**
 * run Puppeteer code
 */
await browser.call(async () => {
    const puppeteer = await browser.getPuppeteer()
    const page = (await puppeteer.pages())[0]
    await page.setRequestInterception(true)
    page.on('request', interceptedRequest => {
        if (interceptedRequest.url().endsWith('webdriverio.png')) {
            return interceptedRequest.continue({
                url: 'https://user-images.githubusercontent.com/10379601/29446482-04f7036a-841f-11e7-9872-91d1fc2ea683.png'
            })
        }

        interceptedRequest.continue()
    })
})

// continue with WebDriver commands
await browser.url('https://v6.webdriver.io')
await browser.pause(2000)

/**
 * now on the https://webdriver.io page you see the Puppeteer logo
 * instead of the WebdriverIO one
 */

await browser.deleteSession()

wdio:devtoolsOptions Capability

In order to set Puppeteer specific configurations you can use the wdio:devtoolsOptions capability which is a custom property (compliant to the WebDriver protocol), e.g.:

{
    browserName: 'chrome',
    'wdio:devtoolsOptions': {
        headless: true,
        defaultViewport: {
            width: 800,
            height: 600,
            deviceScaleFactor: 1,
            isMobile: false
        }
    }
}

Commands

The following commands are already supported:

Selector Strategies

Browser

  • [x] Chrome
  • [x] Firefox (nightly only)
  • [x] Edge
  • [ ] Safari

Current Tags

  • 7.0.0-beta.4                                ...           beta (4 years ago)
  • 8.6.8                                ...           latest (2 years ago)
  • 5.23.0                                ...           latest-5 (5 years ago)
  • 8.0.0-alpha.631                                ...           next (2 years ago)
  • 7.30.2                                ...           v7 (2 years ago)

268 Versions

  • 8.6.8                                ...           2 years ago
  • 8.6.6                                ...           2 years ago
  • 8.6.2                                ...           2 years ago
  • 8.6.1                                ...           2 years ago
  • 8.6.0                                ...           2 years ago
  • 8.5.9                                ...           2 years ago
  • 8.5.7                                ...           2 years ago
  • 7.30.2                                ...           2 years ago
  • 8.5.6                                ...           2 years ago
  • 8.5.5                                ...           2 years ago
  • 8.5.1                                ...           2 years ago
  • 8.4.0                                ...           2 years ago
  • 8.3.11                                ...           2 years ago
  • 8.3.8                                ...           2 years ago
  • 8.3.5                                ...           2 years ago
  • 8.3.3                                ...           2 years ago
  • 8.3.2                                ...           2 years ago
  • 8.3.1                                ...           2 years ago
  • 8.3.0                                ...           2 years ago
  • 8.2.3                                ...           2 years ago
  • 8.2.2                                ...           2 years ago
  • 8.2.0                                ...           2 years ago
  • 7.30.0                                ...           2 years ago
  • 8.1.3                                ...           2 years ago
  • 8.1.2                                ...           2 years ago
  • 8.1.0                                ...           2 years ago
  • 8.0.15                                ...           2 years ago
  • 8.0.14                                ...           2 years ago
  • 7.28.1                                ...           2 years ago
  • 7.28.0                                ...           2 years ago
  • 8.0.13                                ...           2 years ago
  • 8.0.11                                ...           2 years ago
  • 8.0.10                                ...           2 years ago
  • 8.0.9                                ...           2 years ago
  • 8.0.8                                ...           2 years ago
  • 8.0.7                                ...           2 years ago
  • 8.0.6                                ...           2 years ago
  • 8.0.2                                ...           2 years ago
  • 8.0.1                                ...           2 years ago
  • 8.0.0                                ...           2 years ago
  • 8.0.0-alpha.631                                ...           2 years ago
  • 8.0.0-alpha.630                                ...           2 years ago
  • 8.0.0-alpha.629                                ...           2 years ago
  • 8.0.0-alpha.621                                ...           2 years ago
  • 8.0.0-alpha.620                                ...           2 years ago
  • 8.0.0-alpha.619                                ...           2 years ago
  • 8.0.0-alpha.607                                ...           2 years ago
  • 8.0.0-alpha.600                                ...           2 years ago
  • 8.0.0-alpha.598                                ...           2 years ago
  • 8.0.0-alpha.593                                ...           2 years ago
  • 7.27.0                                ...           2 years ago
  • 8.0.0-alpha.589                                ...           2 years ago
  • 8.0.0-alpha.577                                ...           2 years ago
  • 8.0.0-alpha.565                                ...           2 years ago
  • 8.0.0-alpha.563                                ...           2 years ago
  • 8.0.0-alpha.558                                ...           2 years ago
  • 7.26.0                                ...           2 years ago
  • 8.0.0-alpha.547                                ...           2 years ago
  • 8.0.0-alpha.537                                ...           2 years ago
  • 8.0.0-alpha.518                                ...           2 years ago
  • 8.0.0-alpha.516                                ...           2 years ago
  • 8.0.0-alpha.512                                ...           2 years ago
  • 8.0.0-alpha.508                                ...           2 years ago
  • 8.0.0-alpha.507                                ...           2 years ago
  • 8.0.0-alpha.505                                ...           2 years ago
  • 8.0.0-alpha.504                                ...           2 years ago
  • 7.20.8-alpha.504                                ...           2 years ago
  • 7.25.4                                ...           2 years ago
  • 8.0.0-alpha.412                                ...           2 years ago
  • 8.0.0-alpha.411                                ...           2 years ago
  • 7.25.1                                ...           2 years ago
  • 8.0.0-alpha.365                                ...           2 years ago
  • 7.25.0                                ...           2 years ago
  • 7.24.1                                ...           2 years ago
  • 8.0.0-alpha.331                                ...           2 years ago
  • 8.0.0-alpha.330                                ...           2 years ago
  • 8.0.0-alpha.329                                ...           2 years ago
  • 8.0.0-alpha.328                                ...           2 years ago
  • 8.0.0-alpha.327                                ...           2 years ago
  • 7.24.0                                ...           2 years ago
  • 7.23.0                                ...           2 years ago
  • 8.0.0-alpha.249                                ...           2 years ago
  • 7.22.0                                ...           2 years ago
  • 8.0.0-alpha.243                                ...           2 years ago
  • 8.0.0-alpha.240                                ...           2 years ago
  • 8.0.0-alpha.239                                ...           2 years ago
  • 7.21.0                                ...           2 years ago
  • 8.0.0-alpha.219                                ...           2 years ago
  • 8.0.0-alpha.213                                ...           2 years ago
  • 7.20.8                                ...           2 years ago
  • 7.20.7                                ...           2 years ago
  • 7.20.6                                ...           2 years ago
  • 7.20.4                                ...           2 years ago
  • 7.20.3                                ...           2 years ago
  • 7.20.2                                ...           2 years ago
  • 7.20.1                                ...           3 years ago
  • 7.20.0                                ...           3 years ago
  • 7.19.7                                ...           3 years ago
  • 7.19.5                                ...           3 years ago
  • 7.19.3                                ...           3 years ago
  • 7.19.2                                ...           3 years ago
  • 7.19.1                                ...           3 years ago
  • 7.19.0                                ...           3 years ago
  • 7.18.0                                ...           3 years ago
  • 7.17.3                                ...           3 years ago
  • 7.17.0                                ...           3 years ago
  • 7.16.16                                ...           3 years ago
  • 7.16.15                                ...           3 years ago
  • 7.16.14                                ...           3 years ago
  • 7.16.13                                ...           3 years ago
  • 7.16.12                                ...           3 years ago
  • 7.16.11                                ...           3 years ago
  • 7.16.10                                ...           3 years ago
  • 7.16.7                                ...           3 years ago
  • 7.16.5                                ...           3 years ago
  • 7.16.3                                ...           3 years ago
  • 7.16.2                                ...           3 years ago
  • 7.16.1                                ...           3 years ago
  • 7.16.0                                ...           3 years ago
  • 7.14.1                                ...           3 years ago
  • 7.13.2                                ...           3 years ago
  • 7.13.1                                ...           3 years ago
  • 7.13.0                                ...           3 years ago
  • 7.12.5                                ...           3 years ago
  • 7.12.4                                ...           3 years ago
  • 7.12.3                                ...           3 years ago
  • 7.12.2                                ...           3 years ago
  • 7.12.1                                ...           3 years ago
  • 7.12.0                                ...           3 years ago
  • 7.11.0                                ...           3 years ago
  • 7.10.1                                ...           3 years ago
  • 7.10.0                                ...           3 years ago
  • 7.9.1                                ...           3 years ago
  • 7.9.0                                ...           3 years ago
  • 7.8.0                                ...           3 years ago
  • 7.7.8                                ...           3 years ago
  • 7.7.7                                ...           3 years ago
  • 7.7.6                                ...           3 years ago
  • 7.7.5                                ...           3 years ago
  • 7.7.4                                ...           3 years ago
  • 7.7.3                                ...           3 years ago
  • 7.7.2                                ...           4 years ago
  • 7.7.0                                ...           4 years ago
  • 7.6.1                                ...           4 years ago
  • 7.6.0                                ...           4 years ago
  • 7.5.7                                ...           4 years ago
  • 7.5.6                                ...           4 years ago
  • 7.5.3                                ...           4 years ago
  • 7.5.2                                ...           4 years ago
  • 7.5.0                                ...           4 years ago
  • 7.4.6                                ...           4 years ago
  • 7.4.5                                ...           4 years ago
  • 7.4.2                                ...           4 years ago
  • 7.4.1                                ...           4 years ago
  • 7.4.0                                ...           4 years ago
  • 7.3.1                                ...           4 years ago
  • 7.3.0                                ...           4 years ago
  • 7.2.1                                ...           4 years ago
  • 7.2.0                                ...           4 years ago
  • 7.1.1                                ...           4 years ago
  • 7.0.9                                ...           4 years ago
  • 7.0.8                                ...           4 years ago
  • 7.0.7                                ...           4 years ago
  • 7.0.5                                ...           4 years ago
  • 7.0.4                                ...           4 years ago
  • 7.0.3                                ...           4 years ago
  • 7.0.2                                ...           4 years ago
  • 7.0.0                                ...           4 years ago
  • 7.0.0-beta.4                                ...           4 years ago
  • 7.0.0-beta.1                                ...           4 years ago
  • 7.0.0-beta.0                                ...           4 years ago
  • 6.12.1                                ...           4 years ago
  • 6.12.0                                ...           4 years ago
  • 6.11.0                                ...           4 years ago
  • 6.10.11                                ...           4 years ago
  • 6.10.10                                ...           4 years ago
  • 6.10.6                                ...           4 years ago
  • 6.10.4                                ...           4 years ago
  • 6.10.2                                ...           4 years ago
  • 6.10.0                                ...           4 years ago
  • 6.9.0                                ...           4 years ago
  • 6.8.0                                ...           4 years ago
  • 6.7.3                                ...           4 years ago
  • 6.7.0                                ...           4 years ago
  • 6.6.3                                ...           4 years ago
  • 6.6.2                                ...           4 years ago
  • 6.6.1                                ...           4 years ago
  • 6.6.0                                ...           4 years ago
  • 6.5.0                                ...           4 years ago
  • 6.4.7                                ...           4 years ago
  • 6.4.6                                ...           4 years ago
  • 6.4.5                                ...           4 years ago
  • 6.4.4                                ...           4 years ago
  • 6.4.1                                ...           4 years ago
  • 6.4.0                                ...           4 years ago
  • 6.3.6                                ...           4 years ago
  • 6.3.4                                ...           4 years ago
  • 6.3.3                                ...           4 years ago
  • 6.3.0                                ...           4 years ago
  • 6.2.0                                ...           4 years ago
  • 6.1.25                                ...           4 years ago
  • 6.1.23                                ...           4 years ago
  • 6.1.22                                ...           4 years ago
  • 6.1.20                                ...           4 years ago
  • 6.1.19                                ...           4 years ago
  • 6.1.17                                ...           4 years ago
  • 6.1.16                                ...           5 years ago
  • 6.1.14                                ...           5 years ago
  • 5.23.0                                ...           5 years ago
  • 6.1.11                                ...           5 years ago
  • 6.1.9                                ...           5 years ago
  • 6.1.8                                ...           5 years ago
  • 6.1.7                                ...           5 years ago
  • 6.1.3                                ...           5 years ago
  • 6.1.2                                ...           5 years ago
  • 6.1.0                                ...           5 years ago
  • 6.0.16                                ...           5 years ago
  • 6.0.14                                ...           5 years ago
  • 6.0.13                                ...           5 years ago
  • 6.0.12                                ...           5 years ago
  • 6.0.11                                ...           5 years ago
  • 6.0.10                                ...           5 years ago
  • 6.0.8                                ...           5 years ago
  • 6.0.7                                ...           5 years ago
  • 6.0.6                                ...           5 years ago
  • 6.0.5                                ...           5 years ago
  • 6.0.4                                ...           5 years ago
  • 6.0.2                                ...           5 years ago
  • 6.0.1                                ...           5 years ago
  • 6.0.0                                ...           5 years ago
  • 5.22.4                                ...           5 years ago
  • 6.0.0-beta.1                                ...           5 years ago
  • 5.22.1                                ...           5 years ago
  • 5.19.0                                ...           5 years ago
  • 6.0.0-beta.0                                ...           5 years ago
  • 5.18.7                                ...           5 years ago
  • 5.18.6                                ...           5 years ago
  • 6.0.0-alpha.1                                ...           5 years ago
  • 5.18.4                                ...           5 years ago
  • 5.18.2                                ...           5 years ago
  • 5.18.0                                ...           5 years ago
  • 6.0.0-alpha.0                                ...           5 years ago
  • 5.17.0                                ...           5 years ago
  • 5.16.15                                ...           5 years ago
  • 5.16.13                                ...           5 years ago
  • 5.16.12                                ...           5 years ago
  • 5.16.11                                ...           5 years ago
  • 5.16.10                                ...           5 years ago
  • 5.16.7                                ...           5 years ago
  • 5.16.6                                ...           5 years ago
  • 5.16.5                                ...           5 years ago
  • 5.16.4                                ...           5 years ago
  • 5.16.3                                ...           5 years ago
  • 5.16.2                                ...           5 years ago
  • 5.16.0                                ...           5 years ago
  • 5.15.6                                ...           5 years ago
  • 5.15.4                                ...           5 years ago
  • 5.15.3                                ...           5 years ago
  • 5.15.1                                ...           5 years ago
  • 5.15.0                                ...           5 years ago
  • 5.14.4                                ...           5 years ago
  • 5.14.3                                ...           5 years ago
  • 5.14.0                                ...           5 years ago
  • 5.13.2                                ...           5 years ago
  • 5.13.0                                ...           5 years ago
  • 5.13.0-alpha.0                                ...           5 years ago
  • 5.7.5                                ...           5 years ago
  • 0.0.0                                ...           11 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (14)
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |