title: How to find one of the two elements using xpath, in python
body: <p>I am trying to find elements whoose xpath changes, so I have tried this.</p>
  <pre><code>for j in range(0,10):
      try:
         datentime4 = browser.find_element_by_xpath('//*[@id=&quot;mytab&quot;]/div[1]/div['+str(j)+']/div[2]')
         if(datentime4):
                      break
         except:
              continue
  </code></pre>
  <p>But along with the above xpath is also wanted to find</p>
  <pre><code>//*[@id=&quot;mytab&quot;]/div[1]/div[2]/div/span
  </code></pre>
  <p>There can be a preference like first search for the above, if not found then for the other.
  I have just started learning python. so, guys please support.
  Using Python3, selenium on windows 10</p>