File tree 4 files changed +34
-11
lines changed
java/src/org/openqa/selenium
4 files changed +34
-11
lines changed Original file line number Diff line number Diff line change 1
1
load ("@rules_jvm_external//:defs.bzl" , "artifact" )
2
2
load ("//java:defs.bzl" , "java_library" )
3
3
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
+
4
23
java_library (
5
24
name = "bidi" ,
6
25
srcs = glob ([
7
26
"*.java" ,
8
27
"log/*.java" ,
9
28
"browsingcontext/*.java"
10
- ]),
29
+ ],
30
+ exclude = AUGMENTER_SRCS ,
31
+ ),
11
32
visibility = [
12
33
"//java/src/org/openqa/selenium/bidi:__subpackages__" ,
13
34
"//java/src/org/openqa/selenium/firefox:__subpackages__" ,
35
+ "//java/src/org/openqa/selenium/remote:__pkg__" ,
14
36
"//java/test/org/openqa/selenium/bidi:__subpackages__" ,
15
37
"//java/test/org/openqa/selenium/grid:__subpackages__" ,
16
38
],
17
39
deps = [
18
- "//java:auto-service" ,
19
40
"//java/src/org/openqa/selenium:core" ,
20
41
"//java/src/org/openqa/selenium/json" ,
21
- "//java/src/org/openqa/selenium/remote" ,
42
+ "//java/src/org/openqa/selenium/remote/http " ,
22
43
artifact ("com.google.guava:guava" ),
23
44
],
24
45
)
Original file line number Diff line number Diff line change 20
20
import com .google .auto .service .AutoService ;
21
21
22
22
import 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 ;
30
23
import org .openqa .selenium .remote .AugmenterProvider ;
31
24
import org .openqa .selenium .remote .ExecuteMethod ;
32
25
import org .openqa .selenium .remote .http .ClientConfig ;
36
29
import java .net .URISyntaxException ;
37
30
import java .util .Optional ;
38
31
import java .util .function .Predicate ;
39
- import java .util .logging .Logger ;
40
32
41
33
@ AutoService (AugmenterProvider .class )
42
34
public class BiDiProvider implements AugmenterProvider <HasBiDi > {
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ java_export(
24
24
exports = [
25
25
":api" ,
26
26
"//java/src/org/openqa/selenium:core" ,
27
+ "//java/src/org/openqa/selenium/bidi" ,
28
+ "//java/src/org/openqa/selenium/bidi:augmenter" ,
27
29
"//java/src/org/openqa/selenium/devtools" ,
28
30
"//java/src/org/openqa/selenium/devtools:augmenter" ,
29
31
"//java/src/org/openqa/selenium/io" ,
@@ -44,11 +46,13 @@ java_library(
44
46
],
45
47
visibility = [
46
48
"//java/src/org/openqa/selenium/devtools:__pkg__" ,
49
+ "//java/src/org/openqa/selenium/bidi:__pkg__" ,
47
50
],
48
51
exports = [
49
52
],
50
53
deps = [
51
54
"//java/src/org/openqa/selenium:core" ,
55
+ "//java/src/org/openqa/selenium/bidi" ,
52
56
"//java/src/org/openqa/selenium/concurrent" ,
53
57
"//java/src/org/openqa/selenium/devtools" ,
54
58
"//java/src/org/openqa/selenium/io" ,
Original file line number Diff line number Diff line change 45
45
import org .openqa .selenium .WebDriverException ;
46
46
import org .openqa .selenium .WebElement ;
47
47
import org .openqa .selenium .WindowType ;
48
+ import org .openqa .selenium .bidi .BiDi ;
49
+ import org .openqa .selenium .bidi .HasBiDi ;
48
50
import org .openqa .selenium .devtools .DevTools ;
49
51
import org .openqa .selenium .devtools .HasDevTools ;
50
52
import org .openqa .selenium .interactions .Interactive ;
@@ -444,6 +446,10 @@ public void quit() {
444
446
((HasDevTools ) this ).maybeGetDevTools ().ifPresent (DevTools ::close );
445
447
}
446
448
449
+ if (this instanceof HasBiDi ) {
450
+ ((HasBiDi ) this ).maybeGetBiDi ().ifPresent (BiDi ::close );
451
+ }
452
+
447
453
execute (DriverCommand .QUIT );
448
454
} finally {
449
455
sessionId = null ;
You can’t perform that action at this time.
0 commit comments