Skip to content

[rust] Fix Windows arm64 logic for Selenium Manager and prepare CI for running the test suite #16046

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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

dennisameling
Copy link

@dennisameling dennisameling commented Jul 12, 2025

User description

🔗 Related Issues

#15801

💥 What does this PR do?

This PR fixes two issues that were preventing the Rust test suite to fully pass on Windows on ARM. While running the tests locally on an arm64 machine, I ran into these errors:

    {
      \"level\": \"ERROR\",
      \"timestamp\": 1752338536,
      \"message\": \"Unsuccessful response (404 Not Found) for URL https://ftp.mozilla.org/pub/firefox/releases/128.12.0esr/win-aarch64/en-US/Firefox%20Setup%20128.12.0esr.exe\"
    }

and

thread 'electron_version_test::case_1' panicked at /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc\library\core\src\ops\function.rs:250:5:
Unexpected failure.
code=65
stderr=```""```
command=`"C:\\repos\\selenium\\rust\\target\\debug\\selenium-manager.exe" "--browser" "electron" "--driver-version" "36.2.1"`
code=65
stdout="[2025-07-12T16:48:12.883Z ERROR] Unsuccessful response (404 Not Found) for URL https://github.com/electron/electron/releases/download/v36.2.1/chromedriver-v36.2.1-win32-arm64-x64.zip\n"
stderr=""

It turned out that the arch names for Windows arm64 were incorrect in the Rust code. Confirmed that these are valid URLs:

https://ftp.mozilla.org/pub/firefox/releases/128.12.0esr/win64-aarch64/en-US/Firefox%20Setup%20128.12.0esr.exe
https://github.com/electron/electron/releases/download/v36.2.1/chromedriver-v36.2.1-win32-arm64.zip

I want to emphasize that Windows ARM64 can run x64 binaries under emulation. So even though e.g. Chrome doesn't have a native Chromedriver yet, Windows ARM64 can run the x64 version under emulation.

This means that the following browsers/drivers will work on Windows ARM64:

Browser Architecture Test status
Chrome + Chromedriver x64 (emulated) ✅ (runs under emulation)
Firefox + Geckodriver arm64 ✅ runs natively
Edge + EdgeDriver arm64 ✅ runs natively
Electron driver arm64 ✅ runs natively

I can confirm that the Rust test suite is passing locally on my Windows arm64 machine.

🔧 Implementation Notes

💡 Additional Considerations

🔄 Types of changes

  • Bug fix (backwards compatible)
  • New feature (non-breaking change which adds functionality and tests!)

PR Type

Bug fix


Description

  • Fix Windows ARM64 platform labels in Selenium Manager

  • Correct Firefox ARM64 URL path from win-aarch64 to win64-aarch64

  • Fix Electron ARM64 platform label from win32-arm64-x64 to win32-arm64

  • Add Windows ARM64 CI testing support


Changes diagram

flowchart LR
  A["Windows ARM64 Detection"] --> B["Firefox Platform Label"]
  A --> C["Electron Platform Label"]
  B --> D["win64-aarch64 URL"]
  C --> E["win32-arm64 URL"]
  F["CI Configuration"] --> G["Windows ARM64 Testing"]
Loading

Changes walkthrough 📝

Relevant files
Bug fix
electron.rs
Correct Electron ARM64 platform label                                       

rust/src/electron.rs

  • Fix Windows ARM64 platform label from win32-arm64-x64 to win32-arm64
  • +1/-1     
    firefox.rs
    Correct Firefox ARM64 platform label                                         

    rust/src/firefox.rs

  • Fix Windows ARM64 platform label from win-aarch64 to win64-aarch64
  • +1/-1     
    Enhancement
    ci-rust.yml
    Enable Windows ARM64 CI testing                                                   

    .github/workflows/ci-rust.yml

    • Add windows-11-arm to CI test matrix
    +1/-0     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @selenium-ci selenium-ci added B-build Includes scripting, bazel and CI integrations C-rust Rust code is mostly Selenium Manager B-manager Selenium Manager labels Jul 12, 2025
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    🎫 Ticket compliance analysis 🔶

    15801 - Partially compliant

    Compliant requirements:

    • Enable CI builds for Windows ARM64
    • Add official support for Windows ARM64 (WoA) platform

    Non-compliant requirements:

    • Distribute native Selenium binaries for Windows ARM64

    Requires further human verification:

    • Verify that CI builds actually produce and distribute native binaries for Windows ARM64
    • Confirm that the platform label fixes resolve the 404 errors mentioned in PR description

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Platform Label

    Verify that the corrected platform label 'win32-arm64' matches the actual URL structure used by Electron releases for Windows ARM64 downloads

        "win32-arm64"
    } else {
    Platform Label

    Verify that the corrected platform label 'win64-aarch64' matches the actual URL structure used by Firefox releases for Windows ARM64 downloads

        platform_label = "win64-aarch64";
    } else {

    Copy link
    Contributor

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @@ -36,6 +36,7 @@ jobs:
    - os: macos
    - os: ubuntu
    - os: windows
    - os: windows-11-arm
    Copy link
    Author

    @dennisameling dennisameling Jul 12, 2025

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    This requires actions/partner-runner-images#77 to be merged first, which apparently is currently going through a last round of tests and should be published soon 🚀

    Alternatively, for the time being, we could use actions-rust-lang/setup-rust-toolchain as suggested here.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    B-build Includes scripting, bazel and CI integrations B-manager Selenium Manager C-rust Rust code is mostly Selenium Manager Review effort 2/5
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants