0

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 ?

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.

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">

Community
  • 1
  • 1
Emna Ayadi
  • 2,430
  • 8
  • 37
  • 77

1 Answers1

0

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.

Emna Ayadi
  • 2,430
  • 8
  • 37
  • 77