如果我有柏树代码:
cy.get('[testid="cancel-button"]').should('not.exist')
cy.get('[testid="reset-button"]').should('not.exist')
cy.get('[testid="other-button"]').should('not.exist')
当然,cypress open
我可以在日志中看到cy.get(XXX)
标准(在我的情况下是 testid 属性),但对于cypress run
HTML 日志,仅输出:
Expected <button.bp3-button> not to exist in the DOM, but it was continuously found.
这有什么帮助?我无法知道哪个失败了,因为我所看到的只是<button.bp3-button>
. 我想在cy.get()
通话中查看 testid 属性。有没有办法让cy.get(XXX)
标准成为<button.bp3-button>
故障日志中的位置?