Yan
Yan

Reputation: 1

In cypress clicking on the button does not load the following page

  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

Answers (1)

Caíque Coelho
Caíque Coelho

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

Related Questions