}
public OperaTimeouts timeouts() {
return new OperaTimeouts() {
public Timeouts implicitlyWait(long time, TimeUnit unit) {
OperaIntervals.IMPLICIT_WAIT.setValue(new Duration(time, unit));
return this;
}
public Timeouts setScriptTimeout(long time, TimeUnit unit) {
OperaIntervals.SCRIPT_TIMEOUT.setValue(new Duration(time, unit));
return this;
}
public Timeouts setDefaultResponseTimeout(long time, TimeUnit unit) {
OperaIntervals.DEFAULT_RESPONSE_TIMEOUT.setValue(new Duration(time, unit));
return this;
}
/* this will not work as expected since SOCKET_READ_RETRY_TIMEOUT is used before it can be changed
public Timeouts setSocketReadRetryTimeout(long time, TimeUnit unit) {
OperaIntervals.SOCKET_READ_RETRY_TIMEOUT.setValue(new Duration(time, unit));
return this;
}
*/
public Timeouts pageLoadTimeout(long time, TimeUnit unit) {
OperaIntervals.PAGE_LOAD_TIMEOUT.setValue(new Duration(time, unit));
return this;
}
public Timeouts responseTimeout(long time, TimeUnit unit) {
OperaIntervals.RESPONSE_TIMEOUT.setValue(new Duration(time, unit));
return this;
}
public Timeouts selftestTimeout(long time, TimeUnit unit) {
OperaIntervals.SELFTEST_TIMEOUT.setValue(new Duration(time, unit));
return this;
}
};
}