【发布时间】:2021-05-07 19:23:56
【问题描述】:
我在 Cypress 中运行测试时遇到此错误:
Timed out retrying after 10050ms: cy.click() failed because this element is not visible:
我怎么才能点击它呢?它只是一个菜单项,我不需要它对我的测试可见。
【问题讨论】:
标签: automation cypress
我在 Cypress 中运行测试时遇到此错误:
Timed out retrying after 10050ms: cy.click() failed because this element is not visible:
我怎么才能点击它呢?它只是一个菜单项,我不需要它对我的测试可见。
【问题讨论】:
标签: automation cypress
您必须添加{force: true},它应该会发生点击:
cy.get('locator').click({force: true})
【讨论】: