对于我正在编写的一种情况,我有两个不同的步骤来执行相同的操作:
* Click "R$ "
但是,运行仪表时会出现错误:
Failed Step: Click "R$ "
Specification: specs/example.spec:10
Error Message: Error: Element matching text "R$ " is covered by other element
Stacktrace:
Error: Element matching text "R$ " is covered by other element
at _click (node_modules/taiko/lib/taiko.js:715:15)
如何故意添加重复步骤?
这是我的完整场景:
* Login at "localhost:8001", as "user" and password "pass"
* Goto "localhost:8004/page/status"
* Check if text "Status page" exists on page
* Click "R$ "
* Check if text "Edit status" exists on page
* Click "R$ "
* Change value to "5"
* Click "R$ "
实现是(与source相同):
step("Click <selector>", async function(selector) {
await click(selector);
});