Skip to content

Commit

Permalink
Allow sending DevTools command with custom timeout. (#15059)
Browse files Browse the repository at this point in the history
* Allow sending DevTools command with custom timeout.

* Renaming method to `send`.

* Using correct method in default `send`.

* Fixing formatting.

---------

Co-authored-by: Puja Jagani <[email protected]>
Co-authored-by: Diego Molina <[email protected]>
  • Loading branch information
3 people authored Jan 15, 2025
1 parent fc463fd commit 7e194df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions java/src/org/openqa/selenium/devtools/DevTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ public void disconnectSession() {
}

public <X> X send(Command<X> command) {
return send(command, this.timeout);
}

public <X> X send(Command<X> command, Duration timeout) {
Require.nonNull("Command to send", command);
return connection.sendAndWait(cdpSession, command, timeout);
}
Expand Down

0 comments on commit 7e194df

Please sign in to comment.