无法将项目添加到量角器e2e测试中

问题描述 投票:0回答:1

我有一个离子菜单按钮,无法添加到量角器e2e测试中。我尝试通过元素,通过xpath,通过CSS,一切。它总是会出错。

这是按钮:

enter image description here

这是我尝试过的:

 //element(by.css('ion-header button')).click(); 
//element(by.xpath('/html/body/ion-app/ng-component/ion-nav/page-home-tutor/ion-header/ion-header/ion-navbar/button[1]')).click();

还有其他事情,但是看来我无法连接按钮或无法使按钮被点击。

如何使它起作用?

html angular ionic-framework button protractor
1个回答
0
投票
Browser.actions().mouseMove($('ion-header button')).mouseDown().mouseUp().perform;
© www.soinside.com 2019 - 2024. All rights reserved.