我有一些代码试图捕获 iframe 中的元素,但我只是不断被抛出一个错误
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})
这是我得到的错误:
最后,这是 iframe 信息: