-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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 permissions module commands in JS #15304
[js][bidi]: implement permissions module commands in JS #15304
Conversation
For Chrome, the permission module tests pass from Chrome 134 onwards, which is currently in Chrome Beta, hence the CI is currently failing. |
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.
HI @navin772 ,
Thank you for the PR.
A couple of suggestions:
-
Let's add browser compatibility info in the docs, something like:
@requires Chrome 134+ or equivalent browser with BiDi permissions support
-
Consider implementing permissions as a separate module since it deserves its own namespace (we could eventually support camera, microphone, geolocation, etc.)
Thanks,
Sri
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.
Thank you @navin772 !
…5304) * implement BiDi permission module for JS * add tests for permission module * ignore chrome browser tests * modify test as per chrome default permissions * run `format.sh` * remove initial permission assertions as it is different for browsers/envvironments * move `permissions.js` to `external/` dir --------- Co-authored-by: Puja Jagani <puja.jagani93@gmail.com> Co-authored-by: Sri Harsha <12621691+harsha509@users.noreply.github.com>
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.
Motivation and Context
Implement commands from extension module permissions - https://www.w3.org/TR/permissions/#automation-webdriver-bidi
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
Implemented BiDi permissions module for JavaScript.
Added support for setting permission states programmatically.
Developed comprehensive tests for permission module functionality.
Ensured compatibility with multiple browsers (Chrome, Firefox, Edge).
Changes walkthrough 📝
permissions.js
Implement BiDi permissions module functionality
javascript/node/selenium-webdriver/bidi/permissions.js
Permission
class to manage BiDi permissions.setPermission
method to set permission states.PermissionState
constants for state validation.getPermissionInstance
for external usage.permissions_test.js
Add tests for BiDi permissions module
javascript/node/selenium-webdriver/test/bidi/permissions_test.js