title: How do I click depending on state of toggle switch?
body: <p>I have a toggle switch I want to click depending on what the switch state is.</p>
  
  <p>If it is "span.switch-right" I want to do:</p>
  
  <pre><code>findElement(By.cssSelector("span.switch-left")).click();
  </code></pre>
  
  <p>If it is "span.switch-left" I want to do:</p>
  
  <pre><code>findElement(By.cssSelector("span.switch-right")).click();
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div tabindex="0" class="has-switch switch-on switch-animate"&gt;
      &lt;div&gt;
          &lt;span class="switch-left"&gt;ON&lt;/span&gt;
          &lt;label for="profile_isProfileSharedWithNearby"&gt;&amp;nbsp;&lt;/label&gt;
          &lt;span class="switch-right"&gt;OFF&lt;/span&gt;
          &lt;input id="profile_isProfileSharedWithNearby" name="profile[isProfileSharedWithNearby]" class="form-control-borderless hide" value="1" checked="checked" type="checkbox"&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>