title: How to test Tooltip text using MouseOver using Selenium webdriver
body: <p>I have a small baggage icon which when hover the mouse over the icon, a tooltip text displays. I want to test this by writing C# code in Visual Studio.</p>
  
  <p>Here is how the baggage icon displayed in html:</p>
  
  <pre><code>&lt;div class="icon_png information icon_baggageyes" title="1 piece included in this fare."&gt;&lt;/div&gt;
  </code></pre>
  
  <p>And here is my code to test the tooltip:</p>
  
  <pre><code>Actions a = new Actions(driver);
  IWebElement tooTipObject = driver.FindElement(By.XPath("//div[@class='icon_png information icon_baggageyes']"));
  a.MoveToElement(tooTipObject).Click().Build().Perform();
  </code></pre>
  
  <p>The problem is when I debug step by step the code above, the tooltip text will show up. But when I run the test, the tooltip text does now show.</p>
  
  <p>By searching on the internet, some people say the reason is the mouse does not focus on the baggage icon long enough time for the tooltip text to display.</p>
  
  <p>But how to resolve this problem? I have been searching for solutions but could not find one that works for mine.</p>
  
  <p>And another question is my code: <code>a.MoveToElement(tooTipObject).Click().Build().Perform();</code>
  the tooltip text will only show if I put <code>.Click()</code> in this code. But I am testing the mouse hover over function, should not be clicking on the icon. This is so weird.</p>