Home > Mobile >  Clicking on a editing button in capybara?
Clicking on a editing button in capybara?

Time:04-14

I'm trying to click on this specific edit button. I'm using find method in ruby to do so, the problem I'm running into is that It's not able to find the specific element.

<i ng-click="grid.appScope.editMOO(row.entity._id)"  role="button" tabindex="0"></I>

Here is my code trying to click on the edit button.

find('.ng-click', class: 'ca ca-pencil-square-o').click

CodePudding user response:

To click on the desired button you can use either of the following Locator Strategies:

find('i[ng-click^="grid.appScope.editM"]').click

or

find('i[ng-click^=grid.appScope.editM]').click
  • Related