0

对于我正在编写的一种情况,我有两个不同的步骤来执行相同的操作:

* 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);
});
4

1 回答 1

0

仪表中允许重复的步骤。但是您面临的错误来自太鼓。因此,请检查您尝试单击的元素是否被任何其他元素覆盖。

于 2019-06-07T08:06:57.063 回答