点击进入图标不工作的量角器 [英] Click into an icon isn't working on protractor

查看:136
本文介绍了点击进入图标不工作的量角器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个图标,添加一个新的项目,我想点击进入,但动作不这样做。我不知道如果我在正确的方式定位元素?

I have an icon to add a new item, i want to click into it but the action isn't done. I don't know if i'm locating the element in a right way ?

我曾尝试在所提供的答案<一个href=\"http://stackoverflow.com/questions/31586911/how-to-click-on-calendar-icon-using-class-in-angular-protractor\">Question

I have tried the answer provided in that Question :

element(by.css('[ng-click="createWL()"]')).click();

element(by.css("button[ng-click*=createWL]")).click();

但它没有为我工作。

But it didn't work for me.

下面我的html code:&LT;按钮类=MD-图标按钮监视列表图标按钮MD-按钮MD-墨波纹型=按钮NG-transclude =ID =addWLARIA标签=添加监视列表中NG点击=createWL()&GT; &LT; NG-MD-图标图标=add_circle_outline级=NG-范围&GT;

Here my html code : <button class="md-icon-button watchlist-icon-button md-button md-ink-ripple" type="button" ng-transclude="" id="addWL" aria-label="Add Watchlist" ng-click="createWL()"> <ng-md-icon icon="add_circle_outline" class="ng-scope">

推荐答案

的问题是,它的时间,这样它的失败,我们甚至没有看到在屏幕的图标之前执行此测试。

The problem was that this test is executed before it's time so that it's failed and we didn't even see that icon in the screen.

因此​​,与一些等待修复它。)和测试优先级

So fix it with some wait ;) and test priority.

这篇关于点击进入图标不工作的量角器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆