File tree Expand file tree Collapse file tree 4 files changed +34
-11
lines changed
java/src/org/openqa/selenium Expand file tree Collapse file tree 4 files changed +34
-11
lines changed Original file line number Diff line number Diff line change 11load ("@rules_jvm_external//:defs.bzl" , "artifact" )
22load ("//java:defs.bzl" , "java_library" )
33
4+ AUGMENTER_SRCS = [
5+ "BiDiProvider.java" ,
6+ ]
7+
8+ java_library (
9+ name = "augmenter" ,
10+ srcs = AUGMENTER_SRCS ,
11+ visibility = [
12+ "//java/src/org/openqa/selenium/remote:__pkg__" ,
13+ ],
14+ deps = [
15+ ":bidi" ,
16+ "//java:auto-service" ,
17+ "//java/src/org/openqa/selenium:core" ,
18+ "//java/src/org/openqa/selenium/remote:api" ,
19+ "//java/src/org/openqa/selenium/remote/http" ,
20+ ],
21+ )
22+
423java_library (
524 name = "bidi" ,
625 srcs = glob ([
726 "*.java" ,
827 "log/*.java" ,
928 "browsingcontext/*.java"
10- ]),
29+ ],
30+ exclude = AUGMENTER_SRCS ,
31+ ),
1132 visibility = [
1233 "//java/src/org/openqa/selenium/bidi:__subpackages__" ,
1334 "//java/src/org/openqa/selenium/firefox:__subpackages__" ,
35+ "//java/src/org/openqa/selenium/remote:__pkg__" ,
1436 "//java/test/org/openqa/selenium/bidi:__subpackages__" ,
1537 "//java/test/org/openqa/selenium/grid:__subpackages__" ,
1638 ],
1739 deps = [
18- "//java:auto-service" ,
1940 "//java/src/org/openqa/selenium:core" ,
2041 "//java/src/org/openqa/selenium/json" ,
21- "//java/src/org/openqa/selenium/remote" ,
42+ "//java/src/org/openqa/selenium/remote/http " ,
2243 artifact ("com.google.guava:guava" ),
2344 ],
2445)
Original file line number Diff line number Diff line change 2020import com .google .auto .service .AutoService ;
2121
2222import org .openqa .selenium .Capabilities ;
23- import org .openqa .selenium .devtools .CdpEndpointFinder ;
24- import org .openqa .selenium .devtools .CdpInfo ;
25- import org .openqa .selenium .devtools .CdpVersionFinder ;
26- import org .openqa .selenium .devtools .DevTools ;
27- import org .openqa .selenium .devtools .HasDevTools ;
28- import org .openqa .selenium .devtools .SeleniumCdpConnection ;
29- import org .openqa .selenium .devtools .noop .NoOpCdpInfo ;
3023import org .openqa .selenium .remote .AugmenterProvider ;
3124import org .openqa .selenium .remote .ExecuteMethod ;
3225import org .openqa .selenium .remote .http .ClientConfig ;
3629import java .net .URISyntaxException ;
3730import java .util .Optional ;
3831import java .util .function .Predicate ;
39- import java .util .logging .Logger ;
4032
4133@ AutoService (AugmenterProvider .class )
4234public class BiDiProvider implements AugmenterProvider <HasBiDi > {
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ java_export(
2424 exports = [
2525 ":api" ,
2626 "//java/src/org/openqa/selenium:core" ,
27+ "//java/src/org/openqa/selenium/bidi" ,
28+ "//java/src/org/openqa/selenium/bidi:augmenter" ,
2729 "//java/src/org/openqa/selenium/devtools" ,
2830 "//java/src/org/openqa/selenium/devtools:augmenter" ,
2931 "//java/src/org/openqa/selenium/io" ,
@@ -44,11 +46,13 @@ java_library(
4446 ],
4547 visibility = [
4648 "//java/src/org/openqa/selenium/devtools:__pkg__" ,
49+ "//java/src/org/openqa/selenium/bidi:__pkg__" ,
4750 ],
4851 exports = [
4952 ],
5053 deps = [
5154 "//java/src/org/openqa/selenium:core" ,
55+ "//java/src/org/openqa/selenium/bidi" ,
5256 "//java/src/org/openqa/selenium/concurrent" ,
5357 "//java/src/org/openqa/selenium/devtools" ,
5458 "//java/src/org/openqa/selenium/io" ,
Original file line number Diff line number Diff line change 4545import org .openqa .selenium .WebDriverException ;
4646import org .openqa .selenium .WebElement ;
4747import org .openqa .selenium .WindowType ;
48+ import org .openqa .selenium .bidi .BiDi ;
49+ import org .openqa .selenium .bidi .HasBiDi ;
4850import org .openqa .selenium .devtools .DevTools ;
4951import org .openqa .selenium .devtools .HasDevTools ;
5052import org .openqa .selenium .interactions .Interactive ;
@@ -444,6 +446,10 @@ public void quit() {
444446 ((HasDevTools ) this ).maybeGetDevTools ().ifPresent (DevTools ::close );
445447 }
446448
449+ if (this instanceof HasBiDi ) {
450+ ((HasBiDi ) this ).maybeGetBiDi ().ifPresent (BiDi ::close );
451+ }
452+
447453 execute (DriverCommand .QUIT );
448454 } finally {
449455 sessionId = null ;
You can’t perform that action at this time.
0 commit comments