-1
  <select _ngcontent-c4="" ng-reflect-is-disabled="false" class="ng-untouched ng-pristine ng-valid">
    <option _ngcontent-c4="" selected="selected" value="People" ng-reflect-value="People">People</option>
    <option _ngcontent-c4="" value="Quality" ng-reflect-value="Quality">Quality</option>
    <option _ngcontent-c4="" value="Profitable Growth" ng-reflect-value="Profitable Growth">Profitable Growth</option>
</select>

I want to find People / Quality / Profitable Growth value from dropdown and click on it. Please let me know if anyone is having guideline for the same. TIA

  • Possible duplicate of [How to select option in drop down protractorjs e2e tests](https://stackoverflow.com/questions/19599450/how-to-select-option-in-drop-down-protractorjs-e2e-tests) – Anand Jan 16 '18 at 14:06

1 Answers1

0

Below code only according to your give out HTML code:

selectOption(from, option) {
  from.element(by.xpath('./option[.="+option+"]')).click();
}

var from = element(by.css('select.ng-untouched.ng-pristine.ng-valid')));
var option = 'Pepole';

selectOption(from, option);
yong
  • 13,357
  • 1
  • 16
  • 27