Repository navigation
Add tested Python examples for BiDi network response events - #3019
Open
jaduichirag wants to merge 1 commit into
Open
jaduichirag wants to merge 1 commit into
jaduichirag wants to merge 1 commit into
Conversation
Fill the Python tabs for "Response Started" and "Response Completed" on the WebDriver BiDi Network page, which showed the "code needed" badge. The new tests in examples/python/tests/bidi/test_network_commands.py mirror the Java examples: subscribe with add_event_handler, navigate, and assert on the browsing context, request method and response status. Part of SeleniumHQ#2890
👷 Deploy request for selenium-dev pending review.Visit the deploys page to approve it
|
Contributor
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Part of #2890.
On the WebDriver BiDi Network page, the Python tabs for Response Started and Response Completed showed the "code needed" badge. This PR adds tested examples for both and references them with
gh-codeblock.test_response_started_eventandtest_response_completed_eventtoexamples/python/tests/bidi/test_network_commands.py. They follow the Java examples: subscribe withdriver.network.add_event_handler(...), navigate, then assert the browsing context, request method and response status.network.en.md,network.ja.md,network.pt-br.mdandnetwork.zh-cn.md.Note for reviewers: in Selenium 4.54, the
response_startedcallback receives a plaindict, whileresponse_completedreceives aResponseCompletedParametersobject. The examples use each one as the binding returns it. The likely cause is a duplicate"response_started"key inNetwork.EVENT_CONFIGS, which replaces the typed entry withdict. I'm happy to raise this separately in SeleniumHQ/selenium.Motivation and Context
Issue #2890 asks for the pages listed in
llms.txtto have tested examples in every binding.Types of changes
Checklist
How tested
pytest tests/bidi/test_network_commands.py: 10 passed, including the 2 new tests (Selenium 4.54.0, Chrome, Windows).