We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8b41ce commit d70664fCopy full SHA for d70664f
src/BlazorWebView/tests/MauiDeviceTests/WebViewHelpers.Windows.cs
@@ -11,6 +11,17 @@ public static partial class WebViewHelpers
11
public static async Task WaitForWebViewReady(WebView2 wv2)
12
{
13
CoreWebView2 coreWebView2 = null;
14
+
15
+ // Ensure that the WebView2 runtime is installed and initialized and has a CoreWebView2 instance.
16
+ if (wv2?.CoreWebView2 == null)
17
+ {
18
+ string version = CoreWebView2Environment.GetAvailableBrowserVersionString(null);
19
+ if (string.IsNullOrEmpty(version))
20
21
+ throw new InvalidOperationException("WebView2 runtime is not installed.");
22
+ }
23
+ await wv2.EnsureCoreWebView2Async();
24
25
26
await Retry(() =>
27
0 commit comments