SeleniumHQ / seleniumhq.github.io

Official Selenium website and documentation
https://selenium.dev
Apache License 2.0
1.03k stars 1.23k forks source link

Release 4.22 Updates #1765

Closed titusfortner closed 1 week ago

titusfortner commented 4 weeks ago

Description

Status

Still need to:

  1. Add image to blog
  2. add enable bidi code to options examples
  3. ~update translations~
  4. ~put the low-level examples in Java and JS back~

Feedback Needed

Everything under here: https://deploy-preview-1765--selenium-dev.netlify.app/documentation/webdriver/bidi/ Including all this: https://deploy-preview-1765--selenium-dev.netlify.app/documentation/webdriver/bidi/cdp/

Motivation and Context

Selenium 4.22!


PR Type

enhancement


Description


Changes walkthrough ๐Ÿ“

Relevant files
Dependencies
SeleniumDocs.csproj
Update .NET Selenium package versions to 4.22.0                   

examples/dotnet/SeleniumDocs/SeleniumDocs.csproj
  • Updated Selenium.Support package version to 4.22.0
  • Updated Selenium.WebDriver package version to 4.22.0
  • +2/-2     
    pom.xml
    Update Java Selenium version to 4.22.0                                     

    examples/java/pom.xml - Updated `selenium.version` property to 4.22.0
    +1/-1     
    package-lock.json
    Update JavaScript Selenium package version in package-lock.json to
    4.22.0

    examples/javascript/package-lock.json - Updated `selenium-webdriver` package version to 4.22.0
    +7/-7     
    package.json
    Update JavaScript Selenium package version in package.json to 4.22.0

    examples/javascript/package.json - Updated `selenium-webdriver` package version to 4.22.0
    +1/-1     
    pom.xml
    Update Kotlin Selenium version to 4.22.0                                 

    examples/kotlin/pom.xml - Updated `selenium.version` property to 4.22.0
    +1/-1     
    requirements.txt
    Update Python Selenium package version to 4.22.0                 

    examples/python/requirements.txt - Updated `selenium` package version to 4.22.0
    +1/-1     
    Gemfile
    Update Ruby Selenium gem version to 4.22.0                             

    examples/ruby/Gemfile - Updated `selenium-webdriver` gem version to 4.22.0
    +1/-1     

    ๐Ÿ’ก PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    codiumai-pr-agent-pro[bot] commented 4 weeks ago

    PR Reviewer Guide ๐Ÿ”

    โฑ๏ธ Estimated effort to review [1-5] 2
    ๐Ÿงช Relevant tests No
    ๐Ÿ”’ Security concerns No
    โšก Key issues to review None
    netlify[bot] commented 4 weeks ago

    Deploy Preview for selenium-dev ready!

    Name Link
    Latest commit 02b3af6c8631fa83680e6e86ff4f8c94eec13abb
    Latest deploy log https://app.netlify.com/sites/selenium-dev/deploys/668e95b02ca9810008fbe446
    Deploy Preview https://deploy-preview-1765--selenium-dev.netlify.app
    Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify site configuration.

    codiumai-pr-agent-pro[bot] commented 4 weeks ago

    PR Code Suggestions โœจ

    CategorySuggestion                                                                                                                                    Score
    Security
    Verify the integrity hashes for the new package versions ___ **Double-check the integrity hashes for the new package versions to ensure they match the
    expected values from the package registry. This helps in verifying the integrity and
    authenticity of the packages.** [examples/javascript/package-lock.json [1018-1020]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1765/files#diff-9e9f1801be0cdd2ca5839a8a8bda05bc37424f1bc94c8f1b196282d65552e5bcR1018-R1020) ```diff +"version": "4.22.0", +"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.22.0.tgz", +"integrity": "sha512-GNbrkCHmy249ai885wgXqTfqL2lZnclUH/P8pwTDIqzyFxU3YhDiN7p/c9tMFA4NhgRdEBO2QCG+CWmG7xr/Mw==", - ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 8 Why: Ensuring the integrity of package versions is crucial for security. The suggestion directly relates to the changes made in the PR and addresses a significant security aspect.
    8
    Best practice
    Verify compatibility of new package versions with existing packages ___ **Ensure that the new package versions are compatible with the existing packages in the
    project. Sometimes, updating a package version can introduce breaking changes or
    incompatibilities with other packages.** [examples/dotnet/SeleniumDocs/SeleniumDocs.csproj [13-14]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1765/files#diff-71ac76d07f5edc5b438e23b53604457edcbd5d884bc745536306fb1356b741a1R13-R14) ```diff + + - ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 7 Why: This is a valid suggestion as updating package versions can indeed lead to compatibility issues. However, it does not address a specific issue in the PR, but rather provides a general best practice advice.
    7
    Run tests to ensure no issues with the new Selenium version ___ **After updating the Selenium version, run your test suite to ensure that there are no
    breaking changes or issues introduced by the new version.** [examples/python/requirements.txt [1]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1765/files#diff-c233c301c314607d2dfcee9a9ec0d5a7b78a67d2c8927808fd4c9d382bbb4a8eR1-R1) ```diff +selenium==4.22.0 - ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 7 Why: Running tests after updating a dependency is a best practice to catch any potential issues early. This suggestion is relevant and practical, though it is a general recommendation rather than addressing a specific issue in the PR.
    7
    Review release notes for the new Selenium WebDriver version ___ **Check the release notes for the new Selenium WebDriver version to understand any new
    features, deprecations, or breaking changes that might affect your project.** [examples/ruby/Gemfile [11]](https://github.com/SeleniumHQ/seleniumhq.github.io/pull/1765/files#diff-050c5bd1b060f5924d57c5aaeedad981932dd1db856e57ddf779dd5e34bd0d97R11-R11) ```diff +gem 'selenium-webdriver', '= 4.22.0' - ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 7 Why: Reviewing release notes is important to understand the impact of new versions, including new features or breaking changes. This is a proactive suggestion relevant to the changes made in the PR.
    7
    codiumai-pr-agent-pro[bot] commented 4 weeks ago

    CI Failure Feedback ๐Ÿง

    (Checks updated until commit https://github.com/SeleniumHQ/seleniumhq.github.io/commit/02b3af6c8631fa83680e6e86ff4f8c94eec13abb)

    **Action:** tests (macos, stable)
    **Failed stage:** [Run tests](https://github.com/SeleniumHQ/seleniumhq.github.io/actions/runs/9875772265/job/27273304892) [โŒ]
    **Failed test name:** Remote WebDriver starts remotely
    **Failure summary:** The action failed because multiple tests in the remote_webdriver_spec.rb file encountered a
    TypeError. Specifically:
  • The method Selenium::Server.get raised a TypeError indicating "no implicit conversion of String into
    Integer".
  • This error occurred in the following tests:
    - Remote WebDriver starts remotely
    - Remote
    WebDriver uploads
    - Remote WebDriver downloads
  • The error was consistently encountered at lines 10, 16, and 17 in the remote_webdriver_spec.rb file.

  • Relevant error logs: ```yaml 1: ##[group]Operating System 2: macOS ... 271: timeout_minutes: 20 272: max_attempts: 3 273: command: cd examples/ruby 274: bundle exec rspec 275: 276: retry_wait_seconds: 10 277: polling_interval_seconds: 1 278: warning_on_retry: true 279: continue_on_error: false ... 284: PATH: /Users/runner/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/runner/.dotnet/tools 285: JAVA_HOME: /Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.23-9/arm64/Contents/Home 286: JAVA_HOME_11_ARM64: /Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.23-9/arm64/Contents/Home 287: ##[endgroup] 288: ......*.........................................................................***...*************...*.....*........*FFF....*********************.................... 289: Pending: (Failures listed here are expected and do not affect your suite's status) 290: 1) Keys copy and paste 291: # Test guarded; Guarded by {:browser=>:chrome, :reason=>"https://bugs.chromium.org/p/chromedriver/issues/detail?id=4264"}; 292: Failure/Error: expect(driver.find_element(id: 'textInput').attribute('value')).to eq 'SeleniumSelenium!' ... 411: 40) Element Locators with relative locators finds near element 412: # These are reference following the documentation example 413: # ./spec/elements/locators_spec.rb:55 414: 41) Element Locators with relative locators chains relative locators 415: # These are reference following the documentation example 416: # ./spec/elements/locators_spec.rb:59 417: Failures: 418: 1) Remote WebDriver starts remotely 419: Got 0 failures and 2 other errors: 420: 1.1) Failure/Error: 421: Selenium::Server.get(:latest, 422: background: true, 423: args: %w[--selenium-manager true --enable-managed-downloads true]) 424: TypeError: 425: no implicit conversion of String into Integer 426: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 427: # ./spec/drivers/remote_webdriver_spec.rb:16:in `block (2 levels) in ' 428: 1.2) Failure/Error: 429: Selenium::Server.get(:latest, 430: background: true, 431: args: %w[--selenium-manager true --enable-managed-downloads true]) 432: TypeError: 433: no implicit conversion of String into Integer 434: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 435: # ./spec/drivers/remote_webdriver_spec.rb:17:in `block (2 levels) in ' 436: 2) Remote WebDriver uploads 437: Got 0 failures and 2 other errors: 438: 2.1) Failure/Error: 439: Selenium::Server.get(:latest, 440: background: true, 441: args: %w[--selenium-manager true --enable-managed-downloads true]) 442: TypeError: 443: no implicit conversion of String into Integer 444: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 445: # ./spec/drivers/remote_webdriver_spec.rb:16:in `block (2 levels) in ' 446: 2.2) Failure/Error: 447: Selenium::Server.get(:latest, 448: background: true, 449: args: %w[--selenium-manager true --enable-managed-downloads true]) 450: TypeError: 451: no implicit conversion of String into Integer 452: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 453: # ./spec/drivers/remote_webdriver_spec.rb:17:in `block (2 levels) in ' 454: 3) Remote WebDriver downloads 455: Got 0 failures and 2 other errors: 456: 3.1) Failure/Error: 457: Selenium::Server.get(:latest, 458: background: true, 459: args: %w[--selenium-manager true --enable-managed-downloads true]) 460: TypeError: 461: no implicit conversion of String into Integer 462: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 463: # ./spec/drivers/remote_webdriver_spec.rb:16:in `block (2 levels) in ' 464: 3.2) Failure/Error: 465: Selenium::Server.get(:latest, 466: background: true, 467: args: %w[--selenium-manager true --enable-managed-downloads true]) 468: TypeError: 469: no implicit conversion of String into Integer 470: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 471: # ./spec/drivers/remote_webdriver_spec.rb:17:in `block (2 levels) in ' 472: Finished in 6 minutes 30 seconds (files took 8.79 seconds to load) 473: 166 examples, 3 failures, 41 pending 474: Failed examples: 475: rspec ./spec/drivers/remote_webdriver_spec.rb:19 # Remote WebDriver starts remotely 476: rspec ./spec/drivers/remote_webdriver_spec.rb:26 # Remote WebDriver uploads 477: rspec ./spec/drivers/remote_webdriver_spec.rb:42 # Remote WebDriver downloads 478: ##[warning]Attempt 1 failed. Reason: Child_process exited with error code 1 479: ......*.........................................................................***...*************...*.....*........*FFF....*********************.................... 480: Pending: (Failures listed here are expected and do not affect your suite's status) 481: 1) Keys copy and paste 482: # Test guarded; Guarded by {:browser=>:chrome, :reason=>"https://bugs.chromium.org/p/chromedriver/issues/detail?id=4264"}; 483: Failure/Error: expect(driver.find_element(id: 'textInput').attribute('value')).to eq 'SeleniumSelenium!' ... 602: 40) Element Locators with relative locators finds near element 603: # These are reference following the documentation example 604: # ./spec/elements/locators_spec.rb:55 605: 41) Element Locators with relative locators chains relative locators 606: # These are reference following the documentation example 607: # ./spec/elements/locators_spec.rb:59 608: Failures: 609: 1) Remote WebDriver starts remotely 610: Got 0 failures and 2 other errors: 611: 1.1) Failure/Error: 612: Selenium::Server.get(:latest, 613: background: true, 614: args: %w[--selenium-manager true --enable-managed-downloads true]) 615: TypeError: 616: no implicit conversion of String into Integer 617: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 618: # ./spec/drivers/remote_webdriver_spec.rb:16:in `block (2 levels) in ' 619: 1.2) Failure/Error: 620: Selenium::Server.get(:latest, 621: background: true, 622: args: %w[--selenium-manager true --enable-managed-downloads true]) 623: TypeError: 624: no implicit conversion of String into Integer 625: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 626: # ./spec/drivers/remote_webdriver_spec.rb:17:in `block (2 levels) in ' 627: 2) Remote WebDriver uploads 628: Got 0 failures and 2 other errors: 629: 2.1) Failure/Error: 630: Selenium::Server.get(:latest, 631: background: true, 632: args: %w[--selenium-manager true --enable-managed-downloads true]) 633: TypeError: 634: no implicit conversion of String into Integer 635: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 636: # ./spec/drivers/remote_webdriver_spec.rb:16:in `block (2 levels) in ' 637: 2.2) Failure/Error: 638: Selenium::Server.get(:latest, 639: background: true, 640: args: %w[--selenium-manager true --enable-managed-downloads true]) 641: TypeError: 642: no implicit conversion of String into Integer 643: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 644: # ./spec/drivers/remote_webdriver_spec.rb:17:in `block (2 levels) in ' 645: 3) Remote WebDriver downloads 646: Got 0 failures and 2 other errors: 647: 3.1) Failure/Error: 648: Selenium::Server.get(:latest, 649: background: true, 650: args: %w[--selenium-manager true --enable-managed-downloads true]) 651: TypeError: 652: no implicit conversion of String into Integer 653: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 654: # ./spec/drivers/remote_webdriver_spec.rb:16:in `block (2 levels) in ' 655: 3.2) Failure/Error: 656: Selenium::Server.get(:latest, 657: background: true, 658: args: %w[--selenium-manager true --enable-managed-downloads true]) 659: TypeError: 660: no implicit conversion of String into Integer 661: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 662: # ./spec/drivers/remote_webdriver_spec.rb:17:in `block (2 levels) in ' 663: Finished in 6 minutes 6 seconds (files took 4.58 seconds to load) 664: 166 examples, 3 failures, 41 pending 665: Failed examples: 666: rspec ./spec/drivers/remote_webdriver_spec.rb:19 # Remote WebDriver starts remotely 667: rspec ./spec/drivers/remote_webdriver_spec.rb:26 # Remote WebDriver uploads 668: rspec ./spec/drivers/remote_webdriver_spec.rb:42 # Remote WebDriver downloads 669: ##[warning]Attempt 2 failed. Reason: Child_process exited with error code 1 670: ......*.........................................................................***...*************...*.....*........*FFF....*********************.................... 671: Pending: (Failures listed here are expected and do not affect your suite's status) 672: 1) Keys copy and paste 673: # Test guarded; Guarded by {:browser=>:chrome, :reason=>"https://bugs.chromium.org/p/chromedriver/issues/detail?id=4264"}; 674: Failure/Error: expect(driver.find_element(id: 'textInput').attribute('value')).to eq 'SeleniumSelenium!' ... 793: 40) Element Locators with relative locators finds near element 794: # These are reference following the documentation example 795: # ./spec/elements/locators_spec.rb:55 796: 41) Element Locators with relative locators chains relative locators 797: # These are reference following the documentation example 798: # ./spec/elements/locators_spec.rb:59 799: Failures: 800: 1) Remote WebDriver starts remotely 801: Got 0 failures and 2 other errors: 802: 1.1) Failure/Error: 803: Selenium::Server.get(:latest, 804: background: true, 805: args: %w[--selenium-manager true --enable-managed-downloads true]) 806: TypeError: 807: no implicit conversion of String into Integer 808: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 809: # ./spec/drivers/remote_webdriver_spec.rb:16:in `block (2 levels) in ' 810: 1.2) Failure/Error: 811: Selenium::Server.get(:latest, 812: background: true, 813: args: %w[--selenium-manager true --enable-managed-downloads true]) 814: TypeError: 815: no implicit conversion of String into Integer 816: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 817: # ./spec/drivers/remote_webdriver_spec.rb:17:in `block (2 levels) in ' 818: 2) Remote WebDriver uploads 819: Got 0 failures and 2 other errors: 820: 2.1) Failure/Error: 821: Selenium::Server.get(:latest, 822: background: true, 823: args: %w[--selenium-manager true --enable-managed-downloads true]) 824: TypeError: 825: no implicit conversion of String into Integer 826: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 827: # ./spec/drivers/remote_webdriver_spec.rb:16:in `block (2 levels) in ' 828: 2.2) Failure/Error: 829: Selenium::Server.get(:latest, 830: background: true, 831: args: %w[--selenium-manager true --enable-managed-downloads true]) 832: TypeError: 833: no implicit conversion of String into Integer 834: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 835: # ./spec/drivers/remote_webdriver_spec.rb:17:in `block (2 levels) in ' 836: 3) Remote WebDriver downloads 837: Got 0 failures and 2 other errors: 838: 3.1) Failure/Error: 839: Selenium::Server.get(:latest, 840: background: true, 841: args: %w[--selenium-manager true --enable-managed-downloads true]) 842: TypeError: 843: no implicit conversion of String into Integer 844: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 845: # ./spec/drivers/remote_webdriver_spec.rb:16:in `block (2 levels) in ' 846: 3.2) Failure/Error: 847: Selenium::Server.get(:latest, 848: background: true, 849: args: %w[--selenium-manager true --enable-managed-downloads true]) 850: TypeError: 851: no implicit conversion of String into Integer 852: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in ' 853: # ./spec/drivers/remote_webdriver_spec.rb:17:in `block (2 levels) in ' 854: Finished in 5 minutes 21 seconds (files took 3.4 seconds to load) 855: 166 examples, 3 failures, 41 pending 856: Failed examples: 857: rspec ./spec/drivers/remote_webdriver_spec.rb:19 # Remote WebDriver starts remotely 858: rspec ./spec/drivers/remote_webdriver_spec.rb:26 # Remote WebDriver uploads 859: rspec ./spec/drivers/remote_webdriver_spec.rb:42 # Remote WebDriver downloads 860: ##[error]Final attempt failed. Child_process exited with error code 1 ```

    โœจ 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` - if `persistent_comment` is 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](https://pr-agent-docs.codium.ai/tools/ci_feedback/).