https://cypress.io logo
Hi, is there a way to bypass the {force:true} in c...
# e2e-testing
b
Hi, is there a way to bypass the {force:true} in click({force:true}), with a Promise for example, to only have a simple click() ?. For example, i created this command to force a click() event with a Promise via then.... Sometimes it works, somoetimes no. Thanks :). Cypress.Commands.add('forceClickOnTab', (tab, selector) => { cy.getBySel(selector) .should('be.visible') .invoke('attr', 'href') .should('include', tab) .then(($el) => { cy.wrap($el) .invoke('click') .then(() => { $el.click() }) }) })