I am using ubuntu 16.04
Timed out waiting 45 seconds for Firefox to start.
Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:07:31.527Z'
System info: host: 'supranimbus-Inspiron-3250', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.10.0-40-generic', java.version: '1.8.0_151'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.firefox.XpiDriverService.waitUntilAvailable(XpiDriverService.java:131)
at org.openqa.selenium.firefox.XpiDriverService.start(XpiDriverService.java:116)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:79)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:600)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:120)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:98)
at facedoxmain.FaceDox.InvokeBrowser(FaceDox.java:17)
at facedoxmain.FaceDox.main(FaceDox.java:57)
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:20033/hub/status] to be available after 45005 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:100)
at org.openqa.selenium.firefox.XpiDriverService.waitUntilAvailable(XpiDriverService.java:129)
I faced this issue and finally found the answer. I had been referencing the Marionette driver which is no longer correct for FF version 53 and up on Selenium 3.5 or higher. The GeckoDriver documentation displays how the system property should be referenced.
I changed my code from:
System.setProperty("webdriver.firefox.marionette", System.getProperty("user.dir") + "path");
to:
System.setProperty("webdriver.gecko.driver", System.getProperty("user.dir") + "path");
and now my local Firefox works perfectly.
Hope this helps others.
I haved this error for 2 days in WIndows, the solution for me was in Set.Plataform put Plataform.ANY or Plataform.Windows because Plataform.WIN10 not worked, marionette wasn't necessary and I added and neether works, only works this. I hope this helps someone else:
public class Main {
public static RemoteWebDriver driver;
public static void main(String[] args) throws MalformedURLException {
System.setProperty("webdriver.gecko.driver", "D:/Lib/geckodriver.exe");
DesiredCapabilities desiredCapabilities = new DesiredCapabilities().firefox();
desiredCapabilities.setPlatform(Platform.ANY);
desiredCapabilities.setBrowserName("firefox");
driver = new RemoteWebDriver(new URL("http://172.20.19.182:5557/wd/hub"), desiredCapabilities);
driver.navigate().to("http://www.google.com");
driver.findElementByName("q").sendKeys("execute automation");
driver.findElementByName("q").sendKeys(Keys.ENTER);
driver.close();
// write your code here
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With