From 59fa096f65a4e3e1dbe127ed8d3af0311fbc957c Mon Sep 17 00:00:00 2001 From: Puja Jagani Date: Mon, 6 Jul 2026 18:13:47 +0530 Subject: [PATCH] [java] Deprecate methods to avoid internal BiDi connection surfacing on driver --- java/src/org/openqa/selenium/bidi/HasBiDi.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/java/src/org/openqa/selenium/bidi/HasBiDi.java b/java/src/org/openqa/selenium/bidi/HasBiDi.java index 25666301b52f5..cc74d0962eda3 100644 --- a/java/src/org/openqa/selenium/bidi/HasBiDi.java +++ b/java/src/org/openqa/selenium/bidi/HasBiDi.java @@ -22,10 +22,20 @@ @Beta public interface HasBiDi { + /** + * @deprecated BiDi is an internal implementation detail. Direct access to the BiDi object from + * drivers will be removed in a future release. + */ + @Deprecated(since = "4.46", forRemoval = true) default BiDi getBiDi() { return maybeGetBiDi() .orElseThrow(() -> new BiDiException("Unable to create a BiDi connection")); } + /** + * @deprecated BiDi is an internal implementation detail. Direct access to the BiDi object from + * drivers will be removed in a future release. + */ + @Deprecated(since = "4.46", forRemoval = true) Optional maybeGetBiDi(); }