Podolszki Ákos Podolszki Ákos - 5 months ago 36
Javascript Question

Selecting an element by ng-click in Protractor

in our angular app there are language icons to change language:

<img style="cursor: pointer; margin-right: 5px; float: left;" height="25px"
src="assets/images/english.jpg" ng-click="setLang('en')" class="">

How can I click on this icon with protractor? Based on other questions this should be the way:


But this one throws a syntax error, because of the 'en' part.
So I also tried these:


But both of these resulted in: No element found using locator

Please advise how can I click on this element?


You need to escape quotes.