From 7e194df3145ce12ecce931237447a9cb33da751c Mon Sep 17 00:00:00 2001 From: Dennis Oelkers Date: Wed, 15 Jan 2025 10:27:44 +0100 Subject: [PATCH] Allow sending DevTools command with custom timeout. (#15059) * Allow sending DevTools command with custom timeout. * Renaming method to `send`. * Using correct method in default `send`. * Fixing formatting. --------- Co-authored-by: Puja Jagani Co-authored-by: Diego Molina --- java/src/org/openqa/selenium/devtools/DevTools.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/src/org/openqa/selenium/devtools/DevTools.java b/java/src/org/openqa/selenium/devtools/DevTools.java index 11a3207954225..fd3469b129c8b 100644 --- a/java/src/org/openqa/selenium/devtools/DevTools.java +++ b/java/src/org/openqa/selenium/devtools/DevTools.java @@ -86,6 +86,10 @@ public void disconnectSession() { } public X send(Command command) { + return send(command, this.timeout); + } + + public X send(Command command, Duration timeout) { Require.nonNull("Command to send", command); return connection.sendAndWait(cdpSession, command, timeout); }