Binding Locator in Protractor
I have a problem with ng-binding locator in Protractor code:
<h1 class="blackText ng-binding">some_link</h1>
I tried to use:
element(by.binding('some_link')).click();
but he did not find anything.
This works:
element(by.cssContainingText('.ng-binding', 'some_link')).click();
but I would like to use a binding locator.
Any ideas?
See this for an example: https://docs.angularjs.org/api/ng/directive/ngBind
Note that in the example you are doing element(by.binding('name')), not element(by.binding('Whirled')). Basically do not use what the binding evaluates, but the name of the binding.