I recently started using Cypress and I'm attempting to retrieve the href attribute for each div tag within a group by utilizing invoke(), however, it is resulting in an error. Could anyone provide guidance on the correct way to achieve this?
cy.get('.bms-scoreboard__game-tile--mls').each(($el,index,$list) => {
$el.get('a')
.invoke('attr','href')
.then(href => {
cy.request(href)
.its('status')
.should('eq',200)
})
})