2 Replies Latest reply on Sep 18, 2009 5:39 AM by Mickael Morier

    How to test a toolTip with Selenium?

    Mickael Morier Newbie

      Hello,

      I'd like to test that a toolTip appears when the mouse is over it.

      I wrote (in Java) :

      selenium.mouseOver("panel1");
      
      selenium.waitForCondition("selenium.browserbot.getCurrentWindow().document.getElementById('tooltip1').style.display=='block'", "10000");
      


      When I run the test (with selenium-server and JUnit), I observe that, after the start of the browser :

      * if the cursor is on the page, the tooltip appears close to the cursor and the test is successful
      * if the cursor is not on the page, for example on the menu bar of Windows, the tooltip never appears (because it tries to appears close to the cursor) and the test fails

      My environment : IE 7 or Firefox 3.5, selenium Server 1.0-beta-2

      Can you help me to solve the problem?

      Thanks in advance :)