WileyLabs / teasy

Test easy with Teasy - UI automation testing framework
MIT License
31 stars 31 forks source link

Element.waitFor().stale doesn't work #184

Closed ishumov closed 6 years ago

ishumov commented 6 years ago

Since there is a method isStale(), that works fine, I suggest to replace

        try {
            this.el.isEnabled();
            return false;
        } catch (StaleElementReferenceException var3) {
            return true;
        }

by return isStale().

ishumov commented 6 years ago

Problem is because of isEnabled() contains againLocate()

    @Override
    public boolean isEnabled() {
        try {
            return wrappedElement.isEnabled();
        } catch (StaleElementReferenceException e) {
            againLocate();
            return isEnabled();
        }
    }
vefimofff commented 6 years ago

fixed 2.0.2