-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[java][bidi] Close BiDi connection on webdriver quit command
- Loading branch information
Showing
4 changed files
with
34 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,45 @@ | ||
load("@rules_jvm_external//:defs.bzl", "artifact") | ||
load("//java:defs.bzl", "java_library") | ||
|
||
AUGMENTER_SRCS = [ | ||
"BiDiProvider.java", | ||
] | ||
|
||
java_library( | ||
name = "augmenter", | ||
srcs = AUGMENTER_SRCS, | ||
visibility = [ | ||
"//java/src/org/openqa/selenium/remote:__pkg__", | ||
], | ||
deps = [ | ||
":bidi", | ||
"//java:auto-service", | ||
"//java/src/org/openqa/selenium:core", | ||
"//java/src/org/openqa/selenium/remote:api", | ||
"//java/src/org/openqa/selenium/remote/http", | ||
], | ||
) | ||
|
||
java_library( | ||
name = "bidi", | ||
srcs = glob([ | ||
"*.java", | ||
"log/*.java", | ||
"browsingcontext/*.java" | ||
]), | ||
], | ||
exclude = AUGMENTER_SRCS, | ||
), | ||
visibility = [ | ||
"//java/src/org/openqa/selenium/bidi:__subpackages__", | ||
"//java/src/org/openqa/selenium/firefox:__subpackages__", | ||
"//java/src/org/openqa/selenium/remote:__pkg__", | ||
"//java/test/org/openqa/selenium/bidi:__subpackages__", | ||
"//java/test/org/openqa/selenium/grid:__subpackages__", | ||
], | ||
deps = [ | ||
"//java:auto-service", | ||
"//java/src/org/openqa/selenium:core", | ||
"//java/src/org/openqa/selenium/json", | ||
"//java/src/org/openqa/selenium/remote", | ||
"//java/src/org/openqa/selenium/remote/http", | ||
artifact("com.google.guava:guava"), | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7a469e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diemol / @pujagani what happens if a user calls
driver.close
and it ends the session. Are they going to face this issue?7a469e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which issue? I guess @pujagani has more context?
7a469e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to need more context on the issue you are referring to.
7a469e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'm talking about closing the browser window — https://w3c.github.io/webdriver/#close-window
If it's the last window it will also end the session, but I don't think we've covered that case as far as also closing the bidi session. Someone reported an error on Slack and it seemed to go away when they switched to using quit instead of close.
7a469e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay. I see your point. You are right, we have not covered that case. I will look into ensuring that if is the last window that ends the session, then even the BiDi session is closed. So that the clean-up is done correctly. Thank you for bringing up this use case.