I got the count of the values inside the drop down and trying to click on each option one by one and verify something but I couldn't click on options.
let button = $('[href* ='something']');
let dropdown = element(by.id('someid'));
let options = dropdown.all(by.tagname('option'));
button.click();
options.then(function (items) {
console.log(items.length);
for (let i = 0; i < items.length; i++) {
items[i].gettext().then(function (text: any) {
items[i].click();
});
}
});
Its showing me error as gettext() is not a function and I tried getattribute('value') also still no use,Can someone help on this please
getText()
, rather thangettext()
– yong