I've seen a similar issue with the latest version of Firefox (15.0) and the current 2.25 Selenium. I have a Javascript-based horizontal menu which displays the menu options as you hover over the menu header. The IWebDriver
code I'm using is:
var menu = driver.FindElement(By.Id("menuId"));
var option = driver.FindElement(By.Id("menuItemId"));
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
Actions actions = new Actions(driver);
actions.MoveToElement(menu, 5, 5).Perform();
wait.Until<bool>((d) =>
{
return option.Displayed;
});
option.Click();
and that works fine with IE and Chrome but not Firefox - the "mouseOver" (MoveToElement
) action just never happens so the menu item is never made visible and the test times out (and fails).
As I'm running my tests from NUnit, I've got a bit of configuration support built-in into my test code so I can control whether I use the web driver directly or use the WebDriverBackedSelenium
(in conjunction with the RC server of course). This allows me to workaround the issue with configuration so that if I'm running the tests in "Firefox mode", I can invoke the server and then use the ISelenium
interface instead like this:
selenium.Click("id=menuItemId");
and that works fine. I have a method that determines what "mode" the tests are running in and invokes the specific click action accordingly i.e. chooses to use either the IWebDriver
interface directly or wrap it via WebDriverBackedSelenium
to use the ISelenium
interface.
If the Firefox driver starts working in the future, I can just switch to using the Firefox web driver natively via configuration again.