title: Protractor - How to verify if the toggle button is selected/Enabled or not selected?
body: <p>I am using protractor to Automate the mobile app. I need to verify if the toggle button(Toggle button Image attached) is checked or not, or enabled or disabled.
  If not selected, select and do some operations, but everytime it says, selected even if not selected and disabled.<img src="https://i.stack.imgur.com/27Qj1.png" alt="Toogle button image attached"></p>
  
  <p>Here is my Code attached:::::::::::</p>
  
  <pre><code>var checkNoti = AppNoti.isSelected();
  
  
      if (checkNoti)
      {
          checkNoti.then( function() {
              console.log('The App notification is enabled Already!!');
          });
  
      }
      else {
  
          AppNoti.click().then( function() {
              console.log('The App notification is Enabled');
                          });
              };
  </code></pre>
  
  <p>Kindly advise...All the time, it says, toggle checkbox button is enabled, even if its disabled.</p>