I\'m using Protractor JS. And the site is written in Angular JS.
So I have a toggle switch. And I noticed the value in the toggle switch goes from true to false and
Remember that isDisplayed() returns a promise, you can try with:
isDisplayed()
element(anyFinder).isDisplayed().then(function(result) { if ( result ) { //Whatever if it is true (displayed) } else { //Whatever if it is false (not displayed) } });