Reputation: 1
cy.get('article button[class*="primary"]').then($button => {
if ($button.is(':visible')) {
cy.wrap($button).click({force:true})
}
})
when executing these commands, it finds the button, but nothing happens.
I tried many ways but I can't find a solution enter image description here
Upvotes: 0
Views: 1346
Reputation: 461
if you will use {force:true} to click you can just use
cy.get('article button[class*="primary"]').click({force:true})
this should work, if not please let me know.
Best regards, Caíque Coelho
Upvotes: 1