Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using Puppeteer
[!WARNING] WebdriverIO is deprecating the use of Chrome Devtools as automation protocol through a WebDriver like interface. Instead, you can use the
getPuppeteer
command to get ahold of a Puppeteer instance for Chrome Devtools introspection and automation.
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.
npm i webdriverio
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
*/
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://v6.webdriver.io page you see the Puppeteer logo
* instead of the WebdriverIO one
*/
await browser.deleteSession()
wdio:devtoolsOptions
CapabilityIn 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
}
}
}
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 534,686 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.