title: Using an OR condition in Xpath to identify the same element
body: <p>I have this logic which gets the current page's title first clicks on next button, fetches the title again and if both the titles are the same, meaning navigation has not moved to the next page, it clicks on Next again. </p>
  
  <p>However, my problem is that the title element's Xpath differs - the same title element has two Xpaths. One is some pages the other in some other pages. </p>
  
  <p>It is either this, </p>
  
  <pre><code>(.//span[@class='g-title'])[2]
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>.//span[@class='g-title']
  </code></pre>
  
  <p>So, how can I handle this? </p>