title: JavaScript programatically hover mouse over element
body: <p>I'm writing a vb.net program to automate and manage an online game. I'm using the Awesomium webcontrols to display and manipulate the pages of the game.</p>
  
  <p>There is a point where I need to grab the data that's not shown in the source until the user hovers over a certain element, how can I use javascript (Not jquery please) to hover over it programatically until the data I need becomes available and then grabbed?</p>
  
  <p>I apologise if this has been asked before (Which it has but from the perspective of someone who owns the web page) but I have been searching for hours for a solution and cant find anything.</p>
  
  <p>What I've tried to use but failed is:</p>
  
  <pre class="lang-js prettyprint-override"><code>function findBpDate(){  
      document.getElementById('tileDetails').children[1].children[0].children[1].children[0].fireEvent('onmouseover');    
      return document.getElementsByClassName('text elementText')[0].textContent;
  }
  </code></pre>
  
  <p>This returns "undefined" when it calls back to my application, I'm certain I'm pointing to the right DOM elements though.</p>
  
  <p>This is what I want the javascript to "hover" on:</p>
  
  <pre><code>   &lt;span class="a arrow disabled"&gt;Send troops&lt;/span&gt;
  </code></pre>
  
  <p>Once this element has been "hovered" on, this elements text changes to the text I need to grab:</p>
  
  <pre><code>   &lt;div class="text elementText"&gt;Beginners protection until 20/07/13 07:51 am.&lt;/div&gt;
  </code></pre>
  
  <p>I've shown above what the element looks like when the mouse "hovers" on the element I need it to, however this changes a lot depending on which element the user hovers over while playing the game, from what i gather it's where the source keeps the text for each tooltip in the game. </p>
  
  <p>So I need a function that will hover over a certain element and then while it's hovering, grab the text from the tooltip text/"text elementText" element.</p>