protected InternalSystemClock getClock() { return new InternalSystemClock(); }
protected InternalSystemClock getClock() { return new InternalSystemClock(); }
public WebDriver toStartNewDriverWith(DesiredCapabilities desiredCapabilities) throws IOException { try { return getDriverServicePool().newDriver(desiredCapabilities); } catch (NoSuchSessionException e) { if (maxTries == 0) { throw e; } LOGGER.error(e.getClass().getCanonicalName() + " happened - retrying in 2 seconds"); new InternalSystemClock().pauseFor(2000); return new TryAtMost(maxTries - 1).toStartNewDriverWith(desiredCapabilities); } } }