
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
Attrigen is a data attribute generator tool for quicker and easier location of elements in DOM, used in e2e testing.
Attrigen is a data attribute generator tool for quicker and easier location of elements in DOM, used in e2e testing.
It will generate data-test-id attribute on every DOM element it finds, so it will look like this:
<div id="test" data-test-id="d1">
<p data-test-id="d1p1">One</p>
<p data-test-id="d1p2">Two</p>
<p data-test-id="d1p3">Three</p>
</div>
For example, d1p3 stands for div-1(parent id) paragraph-3(element id), which is elements type and position in the DOM. The longer the data-test-id is, the deeper is elements location in DOM.
npm install attrigen
We will use Playwright project for example
const attrigen = require('attrigen');
test('Example e2e test', async ({page}) => {
// ...
await page.addInitScript(attrigen);
// ...
})
Now you can search for the elements in DOM using simple css selector [data-test-id^=d1p]:
this.pageElement = page.locator('[data-test-id^=d1p]');
FAQs
Attrigen is a data attribute generator tool for quicker and easier location of elements in DOM, used in e2e testing.
We found that attrigen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.