Changing the FirefoxBinary.Timeout value using Selenium Server Standalone and RemoteWebDriver

144 views
Skip to first unread message

Colin

unread,
Nov 19, 2014, 8:10:33 AM11/19/14
to seleniu...@googlegroups.com
The FirefoxBinary has a default Timeout of 45000 milli-seconds.
This can be changed when creating an instance of the FirefoxBinary passed as an argument into the FirefoxWebDriver.

new FirefoxDriver(new FirefoxBinary() { Timeout = TimeSpan.FromSeconds(1)},new FirefoxProfile());
 

Is there a method to change the FirefoxBinary.Timeout when running Selenium Standalone java -jar  selenium-server-standalone-2.44.0.jar and using the RemoteWebDriver?

Selenium version: 2.44.0

OS: Windows Server 2008 R2
Browser: Firefox
Browser version: 28

Tomek Poręba

unread,
Mar 30, 2015, 2:37:51 PM3/30/15
to seleniu...@googlegroups.com
Have you found an answer to this question? I am also looking for a solution.
I need to increase the timout because of problems with initializing remote Firefox instances, for some reason profile cleanup takes sometimes longer than 45sec (https://code.google.com/p/selenium/issues/detail?id=7272#c29).

I tried to pass a binary via DesiredCapabilities, like I do with profile, but it doesn't work:

final FirefoxBinary ffBinary = new FirefoxBinary();
ffBinary.setTimeout(TimeUnit.SECONDS.toMillis(120));  // instead of 45 seconds
baseCapabilities.setCapability(FirefoxDriver.BINARY, ffBinary);
I get an exception on remote side:
 java.lang.ClassCastException: java.util.HashMap cannot be cast to java.lang.String
    at org.openqa.selenium.firefox.FirefoxDriver.getBinary(FirefoxDriver.java:175)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:103)

For now I am stuck with custom-build selenium binary, with modification in FirefoxBinary class (line 52)
private long timeout = SECONDS.toMillis(120);

Tomasz Poręba
Reply all
Reply to author
Forward
0 new messages