title: How to check if the checkbox is selected for protractor e2e testing
body: <p>I am trying to check if a checkbox has been selected and if not check it. No matter what, I can never check it since it never reaches to the click(). Please see code below.</p>
  
  <p>This is the code in the protractor test:</p>
  
  <pre><code>//find item
  var useSslInput = $('#useSsl');
  if(newDirectory.useSsl == true){
         if(!useSslInput.isSelected()){
              useSslInput.click();
           }
           var sslInput = $('#sslCertificate');
           sslInput.sendKeys(newDirectory.sslCertificate);
  } else {
           if(!useSslInput.isSelected()){
             useSslInput.click();
           }
  }
  </code></pre>
  
  <p>The html is below:</p>
  
  <pre><code>&lt;div class="field"&gt;
   &lt;label class="field-label" for="useSsl"&gt;{{::'directory.page.add.label.useSsl' |i18n}}&lt;/label&gt;
  &lt;div class="field-input"&gt;&lt;input id="useSsl" name="useSsl" type="checkbox" ng-model="addEditDirectory.directory.useSsl" ng-checked="addEditDirectory.directory.useSsl"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Am I doing something wrong here?</p>