【发布时间】:2018-02-19 10:55:43
【问题描述】:
如果显示的量角器单击使用异步等待不起作用。我试过以下方法:
public static async clickIfDisplayed(targetElement: ElementFinder) {
if (await targetElement.isPresent() && await targetElement.isDisplayed()) {
await PageHelper.click(targetElement);
}
}
即使元素不存在或不显示,上述内容有时也会点击。请帮助了解我在哪里出错了。
【问题讨论】:
标签: protractor