-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[js] Add high-level script API examples #1834
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
Conversation
PR Reviewer Guide 🔍
Code Duplication
The code for setting up and tearing down the driver is repeated in each test. Consider refactoring this into a separate setup and teardown method to reduce redundancy and improve maintainability.
Magic Numbers
The use of magic numbers (e.g., delay of 3000ms) is found throughout the tests. It's better to define these values as constants at the beginning of the file to increase code readability and ease of maintenance.
Error Handling
There is no error handling for potential failures in network requests or element interactions. Consider adding try-catch blocks or using promise rejection handling to improve the robustness of the tests.
CI Failure Feedback 🧐
(Checks updated until commit 1dfe68e)
Action: tests (ubuntu, nightly)
Failed stage: Install Edge for set binary test [❌]
Failure summary:
The action failed because it was unable to download the Edge stable artifact for the platform linux amd64. The error message Artifact not found of Edge stable for platform linux amd64 indicates that
the required artifact is missing or not available.
Relevant error logs:
1: ##[group]Operating System 2: Ubuntu ... 146: edge-version: stable 147: env: 148: DISPLAY: :99 149: GITHUB_TOKEN: *** 150: GH_TOKEN: *** 151: ##[endgroup] 152: Setup Edge stable 153: Attempting to download Edge stable... 154: ##[error]Artifact not found of Edge stable for platform linux amd64
✨ CI feedback usage guide:
The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
The tool analyzes the failed checks and provides several feedbacks:
- Failed stage
- Failed test name
- Failure summary
- Relevant error logs
In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:
/checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.
Configuration options
enable_auto_checks_feedback- if set to true, the tool will automatically provide feedback when a check is failed. Default is true.excluded_checks_list- a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.enable_help_text- if set to true, the tool will provide a help message with the feedback. Default is true.persistent_comment- if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.final_update_message- ifpersistent_commentis true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.
See more information about the checks tool in the docs.
PR Code Suggestions ✨
|
✅ Deploy Preview for selenium-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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 @pujagani !
Uh oh!
There was an error while loading. Please reload this page.
User description
Thanks for contributing to the Selenium site and documentation!
A PR well described will help maintainers to review and merge it quickly
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, and help reviewers by making them as simple and short as possible.
Description
Add examples to demonstrate usage.
Motivation and Context
Types of changes
Checklist
PR Type
Tests
Description
Changes walkthrough 📝
log.js
Add BiDi logging tests for Firefox in JavaScriptexamples/javascript/test/bidirectional/w3c/log.js
and DOM mutation handling.