Skip to content

Commit 2f18649

Browse files
committed
Allow sending DevTools command with custom timeout.
1 parent c718c0d commit 2f18649

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

java/src/org/openqa/selenium/devtools/DevTools.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,12 @@ public void disconnectSession() {
6666
}
6767

6868
public <X> X send(Command<X> command) {
69-
Require.nonNull("Command to send", command);
70-
return connection.sendAndWait(cdpSession, command, timeout);
69+
return sendWithTimeout(command, this.timeout);
70+
}
71+
72+
public <X> X sendWithTimeout(Command<X> command, Duration timeout) {
73+
Require.nonNull("Command to send", command);
74+
return connection.sendAndWait(cdpSession, command, timeout);
7175
}
7276

7377
public <X> void addListener(Event<X> event, Consumer<X> handler) {

0 commit comments

Comments
 (0)