Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
A WebdriverIO plugin for integrating Healenium's self-healing capabilities to improve test automation stability.
healenium
is a WebdriverIO plugin that integrates Healenium's self-healing capabilities into your automated tests. It ensures your tests remain robust even when locators change due to UI updates, by automatically healing broken selectors during runtime.
$
and $$
syntax used in WDIO7+.Install the plugin via npm:
npm install healenium
Clone the Healenium repository and set up the Docker containers.
Start the Healenium proxy server:
docker-compose up
By default, the proxy server will be available at http://localhost:8080
.
wdio.conf.js
Integrate the plugin into your WebdriverIO configuration:
const healeniumPlugin = require('healenium-wdio-plugin');
exports.config = {
runner: 'local',
hostname: 'localhost', // Healenium Proxy
port: 8080, // Default Healenium port
path: '/wd/hub',
specs: ['./test/specs/**/*.js'],
framework: 'mocha',
onPrepare: function (config, capabilities) {
healeniumPlugin(global.browser, {
hostname: 'localhost', // Proxy hostname
port: 8080, // Proxy port
debug: true, // Enable debug logs
maxRetries: 3 // Maximum healing retries
});
},
};
You can write your tests as usual using the $
and $$
selectors in WebdriverIO. No changes to your test code are needed.
Example test:
describe('Healenium Integration Test', () => {
it('should heal and locate elements', async () => {
const element = await browser.$('.non-existing-selector'); // This selector will fail initially
await element.click(); // Healenium will attempt to heal and locate the element
});
});
Run your tests as usual using WebdriverIO:
npx wdio wdio.conf.js
You can configure the plugin by passing an options object in onPrepare
:
Option | Type | Default | Description |
---|---|---|---|
hostname | string | localhost | The hostname of the Healenium proxy. |
port | number | 8080 | The port of the Healenium proxy. |
debug | boolean | false | Enable debug logs to troubleshoot issues. |
maxRetries | number | 3 | Maximum number of retries for healing operations. |
$
and $$
methods.Connection Errors
hostname
and port
.Element Not Found
We welcome contributions! Please fork the repository, create a new branch, and submit a pull request with your improvements. Feel free to raise issues or feature requests.
This project is licensed under the MIT License. See the LICENSE
file for details.
FAQs
security holding package
The npm package healenium receives a total of 3 weekly downloads. As such, healenium popularity was classified as not popular.
We found that healenium demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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 found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.