Skip to content

[rust] Fix suppport for webview2 (#15797)#17016

Merged
bonigarcia merged 1 commit intotrunkfrom
sm_webview_fix
Jan 27, 2026
Merged

[rust] Fix suppport for webview2 (#15797)#17016
bonigarcia merged 1 commit intotrunkfrom
sm_webview_fix

Conversation

@bonigarcia
Copy link
Member

🔗 Related Issues

Fixes #15797.

💥 What does this PR do?

The support of webview2 is broken since 4.33:

./selenium-manager --browser webview2 --debug
[2026-01-27T13:23:53.690Z DEBUG] msedgedriver not found in PATH
[2026-01-27T13:23:53.691Z DEBUG] webview2 detected at C:\Program Files (x86)\Microsoft\EdgeWebView\Application
[2026-01-27T13:23:53.692Z DEBUG] webview2 not found in the system
[2026-01-27T13:23:53.696Z DEBUG] Reading msedgedriver latest version from https://msedgedriver.microsoft.com/LATEST_STABLE
[2026-01-27T13:23:53.845Z DEBUG] Latest msedgedriver major version is 144
[2026-01-27T13:23:53.845Z DEBUG] Reading msedgedriver version from https://msedgedriver.microsoft.com/LATEST_RELEASE_144_WINDOWS
[2026-01-27T13:23:53.912Z DEBUG] Required driver: msedgedriver 144.0.3719.92
[2026-01-27T13:23:53.912Z DEBUG] msedgedriver 144.0.3719.92 already in the cache
[2026-01-27T13:23:53.913Z INFO ] Driver path: C:\Users\boni\.cache\selenium\msedgedriver\win64\144.0.3719.92\msedgedriver.exe
[2026-01-27T13:23:53.914Z INFO ] Browser path: C:\Program Files (x86)\Microsoft\EdgeWebView\Application

This PR fixes it:

./selenium-manager --browser webview2 --debug
[2026-01-27T13:24:32.978Z DEBUG] msedgedriver not found in PATH
[2026-01-27T13:24:32.980Z DEBUG] webview2 detected at C:\Program Files (x86)\Microsoft\EdgeWebView\Application
[2026-01-27T13:24:32.980Z DEBUG] Running command: REG QUERY HKLM\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5} /v pv
[2026-01-27T13:24:33.013Z DEBUG] Output: "\r\nHKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\EdgeUpdate\\Clients\\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}\r\n    pv    REG_SZ    144.0.3719.93\r\n"
[2026-01-27T13:24:33.019Z DEBUG] Detected browser: webview2 144.0.3719.93
[2026-01-27T13:24:33.023Z DEBUG] Required driver: msedgedriver 144.0.3719.92
[2026-01-27T13:24:33.024Z DEBUG] msedgedriver 144.0.3719.92 already in the cache
[2026-01-27T13:24:33.024Z INFO ] Driver path: C:\Users\boni\.cache\selenium\msedgedriver\win64\144.0.3719.92\msedgedriver.exe
[2026-01-27T13:24:33.024Z INFO ] Browser path: C:\Program Files (x86)\Microsoft\EdgeWebView\Application\144.0.3719.93\msedge.exe

🔄 Types of changes

  • Bug fix (backwards compatible)

@qodo-code-review
Copy link
Contributor

PR Type

Bug fix


Description

  • Fix webview2 browser version detection on Windows

  • Add condition to skip direct file version check for webview2

  • Use registry query to retrieve accurate webview2 version information


File Walkthrough

Relevant files
Bug fix
lib.rs
Add webview2 condition to version detection                           

rust/src/lib.rs

  • Modified Windows browser version detection logic to handle webview2
    separately
  • Added !self.is_webview2() condition to prevent incorrect file version
    retrieval
  • Ensures webview2 uses registry-based version detection instead of
    direct file version check
+1/-1     

@selenium-ci selenium-ci added C-rust Rust code is mostly Selenium Manager B-manager Selenium Manager labels Jan 27, 2026
@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

PR Code Suggestions ✨

No code suggestions found for the PR.

@bonigarcia bonigarcia merged commit 63d2df1 into trunk Jan 27, 2026
71 checks passed
@bonigarcia bonigarcia deleted the sm_webview_fix branch January 27, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-manager Selenium Manager C-rust Rust code is mostly Selenium Manager Review effort 1/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: webview seems not to be detected in 4.33

2 participants