How to retrieve value for ng-bind locator in protractor?

570 views Asked by At

The code line is:

class="ng-binding ng-scope" ng-bind="item.name">Soap

Its a drop down and I want to select the value 'soap'.

1

There are 1 answers

0
Zakaria On

You can use getAttribute on the selected element :

expect(element(by.cssContainingText('option', 'Soap')).getAttribute('class')).toContain('ng-bind');