dynacron-group/parallel-webtest — Issue #4: Parallelization of FirefoxDriver in v2.13.0+ of Selenium causes socket lock
Author: yurodivuie
Created: 2011-12-02 19:58:35+00:00
State: open

At present, when running multiple threads using FirefoxDriver, I'm seeing intermittent failures to retrieve a webdriver from the WebDriverLauncher.getNewWebDriverInstance. This appears to be the sequence of events:

1. WebDriverLauncher.getNewWebDriverInstance is called @Before a test
2. Untrapped WebDriverException is generated, and execution seems to stop for this test.
4. The next test begins execution, and WebDriverLauncher.getNewWebDriverInstance is called again, since a new driver is not created by the first test method.
5. Tests continue to execute without issue, but the method count is off (the @after method fails when it encounters a null driver), so the window never closes.

See this article for details: http://code.google.com/p/selenium/wiki/ScalingWebDriver

I'm still researching... may put in an exception handler that retries browser creation (or reduce threads) as a temporary fix...