I am creating a page object that needs to have a function to check whether a group of elements is disabled.
I have tried the following but it does not work.
areAllElementsDisabled: function (allElements) {
return allElements.filter(function (elem) {
return elem.isEnabled().then(function (isEnabled) {
return isEnabled;
});
}).length===0;
}
Can anybody suggest a way to solve the issue? Thank you!