Reputation: 105
I have an element which has attribute disabled='disabled'. How can i wait, until element stop having that attribute at all, not to be changed on 'enabled', but just not having that attribute at all anymore.
I am checking on attribute value like this:
el.getAttribute('disabled').then(function (atr) {
expect(atr).toMatch('disabled');
});
Now i need to wait for a condition, when this attribute disappear, but didn't find any suitable solution.
Upvotes: 0
Views: 290
Reputation: 42528
You can use the expected condition elementToBeClickable
. It will wait for the element to be displayed and not disabled:
var EC = ExpectedConditions;
browser.wait(EC.elementToBeClickable(element), 5000);
Upvotes: 6