Cypress: How to count number of buttons

Hi I want to count the number of buttons inside a specific tag
How can I print the sum of buttons?

I tried

cy.log(cy.get('dropdown').find('button').count())

But it doesn’t work

Leave a Comment