title: How to handle hidden elements with a single selector
body: <p>I have html page something like this:</p>
  
  <pre><code>&lt;div ng-show="abc ng-hide'"&gt;
    ....
    &lt;select ng-model="failure"&gt;
     ....
    &lt;/select&gt;
  &lt;/div&gt;
  &lt;div ng-show="abc"&gt;
   ...
    &lt;select ng-model="failure"&gt;
     ...
    &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How can I have a single selector which can handle both the Select elements. I need to get the top div when it is not hidden and bottom div otherwise. I tried something like this.</p>
  
  <pre><code>By.xpath("//div[not(contains(@class,'ng-hide'))]//select[@ng-model='failure'])
  </code></pre>