Chris Rankin
Chris Rankin

Reputation: 266

selenium-firefox-driver 2.25.0 not working correctly with Firefox 15

Ever since I upgraded to Firefox 15, my Selenium tests have stopped working. I am using selenium-firefox-driver-2.25.0 and selenium-java-2.25.0. Specifically, the tests are now failing to "click" on certain elements such as items in a GWT drop-down menu.

Am I the only person having this kind of problem, please? I thought that Firefox 15 might simply be "too new" for Selenium and than a 2.25.1 release might follow shortly, but Firefox 15 has been out for a short while now.

The tests all work fine with Firefox 14.0.1. Does Selenium support "native events" for Firefox 15?

Upvotes: 4

Views: 3436

Answers (2)

Rory Solley
Rory Solley

Reputation: 1464

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.

Upvotes: 1

eugene.polschikov
eugene.polschikov

Reputation: 7339

I've come across with a similar problem: selenium test suite was not able to start on just updated ffox(14.0). The only solution I found for me is to rollback to the previous ffox version.

Upvotes: 1

Related Questions