public NotConnectedException(URL url, long timeToWaitInMilliSeconds, String consoleOutput) { super(getMessage(url, timeToWaitInMilliSeconds, consoleOutput)); }
protected void connectToBrowser(long timeToWaitInMilliSeconds) throws IOException { long waitUntil = System.currentTimeMillis() + timeToWaitInMilliSeconds; while (!isConnected() && waitUntil > System.currentTimeMillis()) { for (SocketAddress addr : addresses) { try { connect(addr); break; } catch (ConnectException e) { try { Thread.sleep(250); } catch (InterruptedException ie) { throw new WebDriverException(ie); } } } } if (!isConnected()) { throw new NotConnectedException(socket, timeToWaitInMilliSeconds); } }
public NotConnectedException(Socket socket, long timeToWaitInMilliSeconds) { super(getMessage(socket, timeToWaitInMilliSeconds)); }