我希望能够单击复选框并测试某个元素是否不再位于Cypress的DOM中.有人能建议一下你是怎么做的吗?
//This is the Test when the check box is clicked and the element is there
cy.get('[type="checkbox"]').click();
cy.get('.check-box-sub-text').contains('Some text in this div.')
我想做与上述测试相反的事情.因此,当我再次单击它时,带有该类的div不应该在DOM中.