Skip to content
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

[rust] Fix webview2 support #12966

Merged
merged 1 commit into from
Oct 18, 2023
Merged

[rust] Fix webview2 support #12966

merged 1 commit into from
Oct 18, 2023

Conversation

bonigarcia
Copy link
Member

Description

This PR fixes the support for WebView2, improving the mechanism for detecting the WebView2 version based on registry queries (see source), as suggested in #12958. Example:

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

Motivation and Context

Fix for #12958.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@titusfortner titusfortner added this to the 4.15 milestone Oct 18, 2023
@titusfortner titusfortner merged commit cfe7e1f into trunk Oct 18, 2023
46 of 49 checks passed
@titusfortner titusfortner deleted the sm_improve_webview2 branch October 18, 2023 19:48
aguspe pushed a commit to aguspe/selenium that referenced this pull request Oct 22, 2023
[rust] Improve support for webview2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants