I have some code that tries to catch elements inside an iframe but I just keep getting thrown back an error
it('Send Medication',function(){
cy.get('.aut-iframe')
.should(iframe => expect(iframe.contents().find('body')).to.exist)
.then(iframe => cy.wrap(iframe.contents().find('body')))
.within({}, $iframe => {
cy.get('.pending-medication-check-box').click({force:true})
This is the error that I get:
Lastly, this is the iframe info: