title: How to find Xpath for a web element defined using a Javascript tooltip?
body: <p>When the <strong>Tweets</strong> figure on someone's Twitter page is in the thousands, Twitter rounds it to e.g 12.4K. When you move the mouse over this element, a tooltip tells you the true number e.g. 12,412. </p>
  
  <p>I'm looking to get this actual figure using Selenium WebDriver (probably with its <code>find_element_by_xpath</code> function).</p>
  
  <p>If we take <a href="https://twitter.com/TheEllenShow" rel="nofollow noreferrer">this</a> Twitter page as an example, and inspect the element in Firebug:</p>
  
  <p><a href="https://i.stack.imgur.com/0tEiJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0tEiJ.png" alt="enter image description here"></a></p>
  
  <p>Note that for Firebug to display this HTML, I needed to first click on, in the Style tab of the sidebar:</p>
  
  <p><a href="https://i.stack.imgur.com/G9ELv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G9ELv.png" alt="enter image description here"></a></p>
  
  <p>And the XPath for the anchor is:</p>
  
  <pre><code>/html/body/div[2]/div[2]/div/div[1]/div/div[2]/div/div/div[2]/div/div/ul/li[1]/a
  </code></pre>
  
  <p>From there, I would think I could simply tag on <code>/@data-original-title</code> to this Xpath, and any program that tries to fetch this would succeed. Yet both Webdriver's <code>find_element_by_xpath</code> nor Google Sheet's <code>importXml()</code> fail to retreive anything.</p>
  
  <p>I know very little about Javascript or CSS, but I imagine that the fact that I needed to click on the "Inherited From" would suggest that one or both are involved in my challenge. If so, how so? Can such an XPath query ever succeed in a case like this? If not, how can the exact Tweets number be gotten?</p>
  
  <p>@ Webdriver Experts: Is there a way of mimicking such a mouseover in order to retrieve this value?</p>