-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[py][bidi]: add event handlers for BiDi browsing context #15902
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
base: trunk
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
py/test/selenium/webdriver/common/bidi_browsing_context_events_tests.py
Outdated
Show resolved
Hide resolved
Co-authored-by: qodo-merge-pro[bot] <151058649+qodo-merge-pro[bot]@users.noreply.github.com>
User description
🔗 Related Issues
💥 What does this PR do?
Adds event handlers for the browsing context module:
on_browsing_context_created
on_browsing_context_destroyed
on_navigation_started
on_fragment_navigated
on_dom_content_loaded
on_browsing_context_loaded
on_download_will_begin
on_navigation_aborted
on_navigation_failed
on_navigation_committed
on_user_prompt_closed
on_user_prompt_opened
on_history_updated
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement, Tests
Description
• Add 13 BiDi browsing context event handlers
• Implement context filtering for targeted event subscriptions
• Refactor event handling with improved callback management
• Add comprehensive test suite for all event types
Changes walkthrough 📝
browsing_context.py
Add BiDi event handlers with context filtering
py/selenium/webdriver/common/bidi/browsing_context.py
• Add 13 event handler methods (on_browsing_context_created,
on_navigation_started, etc.)
• Implement context filtering in
_on_event method
• Refactor event subscription/unsubscription logic
•
Simplify BrowsingContextEvent.from_json method
bidi_browsing_context_events_tests.py
Add comprehensive BiDi event handler tests
py/test/selenium/webdriver/common/bidi_browsing_context_events_tests.py
• Add comprehensive test suite with 562 lines of test code
• Test all
13 event handler methods
• Include context-specific event subscription
tests
• Test event handler removal and cleanup functionality