Currently I have a page that there is an element that is displayed randomly. For that, I created a condition function:
this.checkDropdownPresent = function (dropdownLocator, chooseOption) {
dropdownLocator.isPresent().then(function(element) {
if (element) {
let select = dropdownLocator;
select.element(by.cssContainingText('option', chooseOption)).click();
}
});
};
When the element is displayed in the screen, that's working fine and protractor interact with it, but when the element IN NOT DISPLAYED in the screen, I'm getting the message:
Failed: element not visible: Element is not currently visible and may not be manipulated
Any tip to help me with that?