-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[rb] Update unhandled_prompt_behavior
capability to support hash syntax.
#16289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rb] Update unhandled_prompt_behavior
capability to support hash syntax.
#16289
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
6d33076
to
a6558cc
Compare
unhandled_prompt_behavior
capability to support hash syntax.unhandled_prompt_behavior
capability to support hash syntax.
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.
The changes look great. Can you please just fix a formatting issue (probably a trailing space), and then it's good to merge.
Thank you for your contribution! |
User description
💥 What does this PR do?
This PR extends the capability processing method to correctly support the struct format of UserPromptHandler for unhandledPromptBehaviour in a CapabilityRequest
The current implementation supports the "string" only values format. For correct BiDi operation the more complex hash format is required due to a recent change in the Chrome BiDi driver code to enforce
beforeUnload
to beaccept
when only strings are used.The code that worked before the Chrome BiDi update:
The code that now does the same after the Chrome BiDi update:
🔧 Implementation Notes
The implement is backwards compatible with existing code .
💡 Additional Considerations
This PR is to resolve an issue I originally raised in the Capybara project teamcapybara/capybara#2824
This PR does not update the web documentation for Selenium
🔄 Types of changes
PR Type
Enhancement
Description
Add support for hash format in
unhandled_prompt_behavior
capabilityMaintain backward compatibility with existing string format
Enable proper BiDi operation with Chrome driver updates
Add comprehensive test coverage for hash value processing
Diagram Walkthrough
File Walkthrough
options.rb
Enhanced capability processing for hash format
rb/lib/selenium/webdriver/common/options.rb
unhandled_prompt_behavior
processing into dedicated methodoptions_spec.rb
Test coverage for hash format capability
rb/spec/unit/selenium/webdriver/chrome/options_spec.rb
unhandled_prompt_behavior