79392076

Date: 2025-01-27 20:21:20
Score: 0.5
Natty:
Report link

You may have more luck with the checked attribute instead of state.

  cy.get('[id=input1]')
  .invoke('attr', 'checked') 
  .then((checked) => { 
    if (checked) { 
       console.log('checked') 
    } 
    else { 
       console.log('not checked') 
    } 
  })
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: K.Morassi