while (!"complete".equals(debugger.executeJavascript("return document.readyState"))) {
if (System.currentTimeMillis() < endTime) {
sleep(OperaIntervals.POLL_INTERVAL.getMs());
} else {
throw new ResponseNotReceivedException("No response in a timely fashion");
}
}
}
}