title: Getting hover text with selenium in java
body: <p>I am trying to figure out how to get the product availability text from a page like <a href="http://www.walmart.com/browse/TV-Video/TVs/_/N-96v3?" rel="nofollow">http://www.walmart.com/browse/TV-Video/TVs/_/N-96v3?</a>
  (once a store has been selected) I selected 76574 as my zipcode and went to the "In My Store" tab    </p>
  
  <p>The code I have now is </p>
  
  <pre><code>WebElement hoverElement = driver.findElement(By.xpath(".//*[@id='Body_15992428']/span"));
  WebElement hidden = driver.findElement(By.xpath(".//*[@id='slapInfo_NoVariant_15992428']/div"));
  Actions builder = new Actions(driver);    
  builder.clickAndHold(hoverElement).build().perform();
  System.out.println(hidden.getText());
  </code></pre>
  
  <p>**Edit: I tried <code>profile.setEnableNativeEvents(false);</code> and the text is now displayed in the automated browser window. I still cannot get to the text I want though. It does not throw an exception, only displays nothing because the driver thinks its still hidden. Any one know how to fix this?</p>
  
  <p><strike>
  I keep getting </p>
  
  <pre><code>Exception in thread "main" org.openqa.selenium.InvalidElementStateException: Cannot perform native interaction: Could not load native events component.
  </code></pre>
  
  <p>Even after I do</p>
  
  <pre><code> profile.setEnableNativeEvents(true); 
  </code></pre>
  
  <p></strike></p>
  
  <p>Are there any other ways I can get the hidden text, or what am I doing wrong here?</p>
  
  <p>Additionally while I was inspecting the code with firebug, I saw that there is this code</p>
  
  <pre><code>&lt;script type="text/javascript"&gt; WALMART.$(document).ready(function(){ WALMART.$('#Body_15992428').hover(function(){ WALMART.$('#SeeStoreAvailBubble').wmBubble('update',WALMART.$('#bubbleMsgUpdate_15992428').html()); }); }); &lt;/script&gt;
  </code></pre>
  
  <p>I dont really know how to do things directly with javascript but is there is any way of getting the message text directly from that with a javascript executor?</p>