diff --git a/eng/testing/BrowserVersions.props b/eng/testing/BrowserVersions.props index afddf6eab52b01..dd5f54e162bf27 100644 --- a/eng/testing/BrowserVersions.props +++ b/eng/testing/BrowserVersions.props @@ -1,6 +1,6 @@ - 145.0.7632.109 + 145.0.7632.116 1568190 https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1568190 14.5.201 @@ -8,10 +8,10 @@ 1536371 https://storage.googleapis.com/chromium-browser-snapshots/Mac_Arm/1536376 14.3.127 - 145.0.7632.77 - 1568190 - https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1568195 - 14.5.201 + 146.0.7680.31 + 1582197 + https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1582218 + 14.6.202 125.0.1 0.34.0 125.0.1 diff --git a/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs b/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs index 820e4464de9eab..ccfd5c57babee1 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs @@ -419,6 +419,19 @@ protected async Task BrowserRun(ToolCommand cmd, string runArgs, RunO _testOutput.WriteLine("Waiting for page to load"); await page.WaitForLoadStateAsync(LoadState.DOMContentLoaded, new() { Timeout = 1 * 60 * 1000 }); + if (runOptions is BlazorRunOptions) + { + // DOMContentLoaded fires as soon as the initial HTML is parsed, + // but Blazor WebAssembly still needs to download the runtime, + // assemblies, and render the component tree. Wait for actual + // Blazor content to appear before interacting with the page. + // The ".page" class comes from MainLayout.razor and is only + // present after Blazor has rendered (client-side apps) or is + // included in the initial server-rendered HTML (Blazor Web apps). + _testOutput.WriteLine("Waiting for Blazor to finish rendering"); + await page.Locator(".page").WaitForAsync(new() { Timeout = 1 * 60 * 1000 }); + } + if (runOptions.ExecuteAfterLoaded is not null) { await runOptions.ExecuteAfterLoaded(runOptions, page);