I am trying to run Junit tests in parllel ,did a grid setup with 3 nodes , while executing the test got an exception
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms.
My understanding is There is nothing to do with Firefox and selenium version , I believe the exception is due to lock issued by the firefox for an webdriver instance which is not released within 45000 ms which throws an timeout exception for other webdriver instance trying to connect on port 7055 at the same time (mite be because of system slowness)
So i believe increasing the timeout in this case using the following code
DesiredCapabilities capablities = new DesiredCapabilities();
FirefoxBinary firefoxBinary = new FirefoxBinary();
firefoxBinary.setTimeout(120000);
FirefoxProfile profile = new FirefoxProfile();
profile.setAcceptUntrustedCertificates(true);
profile.setAssumeUntrustedCertificateIssuer(false);
capablities = DesiredCapabilities.firefox();
capablities.setCapability("firefox_binary", firefoxBinary);
capablities.setCapability("firefox_profile", profile);
driver = new RemoteWebDriver(new URL("http://" + parameters.getRemoteUrl() + ":4444/wd/hub"), capablities);
but again got an exception WedDriverException : java.util.HashMap cannot be cast to java.lang.String
This exception is thrown when setting capability for firefoxbinary
capablities.setCapability("firefox_binary", firefoxBinary);
Otherwise the RemoteWebdriver instance is created without any issues
Kindly let me know if i am correct in increasing the timeout with regard to the lock on port 7055 , if so kindly help me out in solving the webdriver exception in Firefox Binary