-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[js][bidi]: implement bidi setCacheBehavior
command
#15136
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:
|
* @throws {Error} If behavior is invalid or context IDs are invalid | ||
*/ | ||
async setCacheBehavior(behavior, contexts = null) { | ||
if (!['default', 'bypass'].includes(behavior)) { |
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.
Please help add enum-like structure for 'default' and 'bypass' values.
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
This PR adds the bidi method
setCacheBehavior
defined in the bidi specs for the JS bindings - https://w3c.github.io/webdriver-bidi/#command-network-setCacheBehavior.Motivation and Context
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
Added
setCacheBehavior
method to manage network cache behavior.Implemented validation for cache behavior and context IDs.
Added tests for
setCacheBehavior
covering valid and invalid scenarios.Enhanced BiDi network functionality in JavaScript bindings.
Changes walkthrough 📝
network.js
Implement `setCacheBehavior` method in network module
javascript/node/selenium-webdriver/bidi/network.js
setCacheBehavior
method to set network cache behavior.network.setCacheBehavior
.network_test.js
Add tests for `setCacheBehavior` method
javascript/node/selenium-webdriver/test/bidi/network_test.js
setCacheBehavior
method.default
,bypass
) with and without contexts.