Screenshot added for the element locator
I have tried below ways but didn't work out.
element(by.css('option', 'APPLE')).click();
element(by.xpath("//select[contains(@ng-reflect-model,'Apple')]")).click();
Screenshot added for the element locator
I have tried below ways but didn't work out.
element(by.css('option', 'APPLE')).click();
element(by.xpath("//select[contains(@ng-reflect-model,'Apple')]")).click();
There are several approach can select the option:
1)
element(by.cssContainingText('select[formcontrolname="brandName"] > option', 'APPLE')).click();
2)
element(by.css('select[formcontrolname="brandName"] > option[ng-reflect-value="APPLE"]')).click();
3)
element(by.xpath('//select[@formcontrolname="brandName"]/option[text()="APPLE"]')).click();