Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using Puppeteer
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.
To install this package from NPM run:
$ npm i devtools webdriverio
The following example demonstrates how WebdriverIO can be used with the devtools
package as automation binding using the automationProtocol
option:
const { remote } = require('webdriverio')
let browser;
(async () => {
browser = await remote({
automationProtocol: 'devtools',
capabilities: {
browserName: 'chrome'
}
})
await browser.url('https://webdriver.io')
/**
* run Puppeteer code
*/
await browser.call(async () => {
const puppeteerBrowser = browser.getPuppeteer()
const page = (await puppeteerBrowser.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.refresh()
await browser.pause(2000)
/**
* now on the https://webdriver.io page you see the Puppeteer logo
* instead of the WebdriverIO one
*/
await browser.deleteSession()
})().catch(async (e) => {
console.error(e)
await browser.deleteSession()
})
This package is work in progress. We are working on extending the support to include all possible commands, selector strategies and browser.
The following commands are already supported:
FAQs
A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using Puppeteer
The npm package devtools receives a total of 303,522 weekly downloads. As such, devtools popularity was classified as popular.
We found that devtools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.