Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@wdio/applitools-service
Advanced tools
A WebdriverIO service for visual regression testing using Applitools
A WebdriverIO service for visual regression testing using Applitools
The easiest way is to keep @wdio/applitools-service
as a devDependency in your package.json
.
{
"devDependencies": {
"@wdio/applitools-service": "^6.3.6"
}
}
You can simple do it by:
npm install @wdio/applitools-service --save-dev
Instructions on how to install WebdriverIO
can be found here.
In order to use the service you need to pass the Applitools API key. This can be set in your wdio.conf.js
config file or pass APPLITOOLS_KEY
in your environment so that it can access the Applitools API.
Also make sure that you added applitools
to your service list, e.g.
// wdio.conf.js
export.config = {
// ...
services: [
['applitools', {
key: '<APPLITOOLS_KEY>', // can be passed here or via environment variable `APPLITOOLS_KEY`
serverUrl: 'https://<org>eyesapi.applitools.com', // optional, can be passed here or via environment variable `APPLITOOLS_SERVER_URL`
appName: 'myApp',
// options
proxy: { // optional
url: 'http://corporateproxy.com:8080'
username: 'username', // optional
password: 'secret', // optional
isHttpOnly: true // optional
},
viewport: { // optional
width: 1920,
height: 1080
}
}]
],
// ...
};
Once the service is added you just need to call either the browser.takeSnapshot
command or the browser.takeRegionSnapshot
command to compare images within the badge. The browser.takeRegionSnapshot
command takes two additional parameters: 1) region
which must be of type Region|webdriver.WebElement|EyesRemoteWebElement|webdriver.By
, and 2) frame
of type webdriver.WebElement|EyesRemoteWebElement|string
; see further details here. The command takes a screenshot name so Applitools can compare it always with the correct image from the baseline, e.g.
describe('My Google Search', () => {
it('should open the page', () => {
browser.url('http://google.com')
browser.takeSnapshot('main page')
})
it('should search for something', () => {
$('#lst-ib').addValue('WebdriverIO ❤️ Applitools')
browser.keys('Enter')
browser.takeSnapshot('search')
})
it('should open the page and take snapshot of the region with reddit icon in upper left', () => {
browser.url('https://reddit.com')
browser.takeRegionSnapshot('Reddit icon; main page', 'css=a._30BbATRhFv3V83DHNDjJAO')
})
})
On the Applitools dashboard you should now find the test with two images:
Applitools API key to be used. Can be passed via wdio config or via environment variable APPLITOOLS_KEY
string
Applitools server URL to be used
string
Viewport with which the screenshots should be taken.
object
{'width': 1440, 'height': 900}
Use proxy for http/https connections with Applitools.
object
{
url: 'http://corporateproxy.com:8080'
username: 'username' // optional
password: 'secret' // optional
isHttpOnly: true // optional
}
For more information on WebdriverIO see the homepage.
FAQs
A WebdriverIO service for visual regression testing using Applitools
The npm package @wdio/applitools-service receives a total of 20 weekly downloads. As such, @wdio/applitools-service popularity was classified as not popular.
We found that @wdio/applitools-service demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.