title: How to click on the span element using Selenium and Python
body: <p>I'm trying to identify the following element but no matter the method it doesn't see it.</p>
  <pre><code>&lt;span onclick=&quot;onClickTab('details'); return false;&quot; id = &quot;details&quot; name = &quot;details&quot; class style =&quot;display: inline;&quot;&quot;&gt;...&lt;/span&gt;
  </code></pre>
  <p>I've tried with: <code>Xpath, relative xpath, onclick, onclick contains, by id, by name,</code> just nothing works.
  It is a clickable button which appears after selecting an item in a list.</p>
  <p>Current code is:</p>
  <pre><code>try:
  WebDriverWait(driver,30).until(EC.presence_of_element_located((By.XPATH,&quot;//span[@onclick='onClickTab('details'); return false;']&quot;)))
  except
  print(&quot;Error&quot;)
  
  driver.find_element_by_xpath(&quot;//span[@onclick='onClickTab('details'); return false;']&quot;).click()
  </code></pre>
  <p>if there are any minor syntax problems like a &quot;(&quot; or such it might be because I typed it by hand, that shouldn't be the issue.
  I'm forever grateful if you could point me to the right direction.</p>