这是按钮下一步/保存按钮的代码enter image description here
<a href="javascript:;" class="btn btn-continue float-right w-18" id="formNext" (click)="search()">Next / Save</a>
[我使用下面的代码来使用量角器单击下一步/保存按钮
browser.actions().mouseMove(await element(by.id('formNext')).perform();
await element(by.id('formNext)).click();
您执行操作的顺序不正确。试试这个
let nextbtn = $('#formNext');
await browser.actions().mouseMove(nextbtn).click().perform();
在动作中,您首先需要对元素(click, doublclick etc.)
执行所需的任何动作,然后将其附加perform()