title: Selenium Webdriver (Java) - using AND/OR conditions in XPATH
body: <p>I have HTML with different div's an span's inside:</p>
  
  <pre><code>&lt;div class="test1"&gt;
      &lt;div class="test2"&gt;
          &lt;span title="Time"&gt;Today 11:12am&lt;/span&gt;
      &lt;/div&gt;
      &lt;div class="test3"&gt;
          &lt;span class="test4"&gt;Windows 7 64 bit&lt;/span&gt;
          &lt;span class="test5"&gt;Something&lt;/span&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="test6"&gt;
      &lt;div class="test2"&gt;
          &lt;span title="Time"&gt;Today 11:15am&lt;/span&gt;
      &lt;/div&gt;
      &lt;div class="test3"&gt;
          &lt;span class="test4"&gt;Windows 8 64 bit&lt;/span&gt;
          &lt;span class="test5"&gt;Something&lt;/span&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to find an elements using XPATH by choosing a particular text from different span's. For instance, I need to find an element where is true : <strong>"Today"</strong> text and <strong>"Windows 7"</strong> text. </p>
  
  <p>So, I've tried this statement :</p>
  
  <pre><code>//div[@class="test1"]/div[contains(span,'Today') and contains(span,'Windows')]
  </code></pre>
  
  <p>But this is not working. I've tried to use OR inside, it's working only for one true statement.</p>
  
  <p>Are there others options?</p>