'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



Solution 1:[1]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Caíque Coelho