cypress-get-by-data-set-id
Version:
Cypress get element by data set id
27 lines (16 loc) • 452 B
Markdown
Cypress get element by data-set-id custom command.
```npm i -D cypress-get-by-data-set-id```
In the spec file, I will use the name of the package.
```
import {registerCommand} from "cypress-get-by-data-set-id";
registerCommand();
...
Example:
cy.getByDataSetId('first-name')
.should("be.visible")
.click();
```
[](beemi.raja@gmail.com)