相关疑难解决方法(0)

赛普拉斯:测试元素是否不存在

我希望能够单击一个复选框并测试一个元素不再位于赛普拉斯的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.')
Run Code Online (Sandbox Code Playgroud)

我想做与上述测试相反的事情.所以当我再次点击它时,带有类的div不应该在DOM中.

cypress

84
推荐指数
7
解决办法
3万
查看次数

标签 统计

cypress ×1