UNPKG

cypress-get-by-label

Version:

Example custom Cypress command finding form element by its label

9 lines (6 loc) 245 B
const { getByCommand } = require('./get-by') const registerCommand = (name = 'getByLabel') => { const getByName = getByCommand(name) Cypress.Commands.add(name, { prevSubject: 'optional' }, getByName) } module.exports = { registerCommand }