-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[py][bidi]: add unhandled_prompt_behavior
param for create_user_context
#16112
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
[py][bidi]: add unhandled_prompt_behavior
param for create_user_context
#16112
Conversation
…nhandled_prompt_behavior-param-browser
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
You can use the native dict
instead of importing Dict
from typing
.
I also like the "Simplify dictionary building logic" suggestion from the review bot, but that's up to you.
other than that, LGTM
User description
🔗 Related Issues
💥 What does this PR do?
Adds support for the optional
unhandled_prompt_behavior
parameter for browser module'screate_user_context
command - https://w3c.github.io/webdriver-bidi/#command-browser-createUserContext🔧 Implementation Notes
The required
UserPromptHandler
andUserPromptHandlerType
types are added tosession.py
since in the BiDi spec they come under the Session module types.Most of the WPT tests are failing for this parameter so currently I am verifying if the command supports the parameter in browsers (which it does). We also set
unhandled_prompt_behavior
toIGNORE
inconftest.py
which may affect the tests.💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Add
unhandled_prompt_behavior
parameter tocreate_user_context
methodImplement
UserPromptHandler
andUserPromptHandlerType
classesAdd test for new prompt behavior functionality
Diagram Walkthrough
File Walkthrough
browser.py
Add prompt behavior parameter to context creation
py/selenium/webdriver/common/bidi/browser.py
unhandled_prompt_behavior
parameter tocreate_user_context
methodUserPromptHandler
from session modulesession.py
Implement user prompt handler classes
py/selenium/webdriver/common/bidi/session.py
UserPromptHandlerType
class with valid prompt handler constantsUserPromptHandler
class with validation and serializationbidi_browser_tests.py
Add test for prompt behavior configuration
py/test/selenium/webdriver/common/bidi_browser_tests.py
create_user_context
withunhandled_prompt_behavior