Repository navigation
[iOS] Fix WebView GoBack/GoForward not working for HtmlWebViewSource - #33183
Conversation
🤖 AI Summary📊 Expand Full Review🔍 Pre-Flight — Context & Validation📝 Review Session — Update MauiWKWebView.cs ·
|
| File | Type | Changes |
|---|---|---|
src/Core/src/Platform/iOS/MauiWKWebView.cs |
Fix | +17/-1 |
src/Controls/tests/TestCases.HostApp/Issues/Issue30381.cs |
Test | +170/0 |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30381.cs |
Test | +46/0 |
Concerns from Code Review
- Thread.Sleep in tests: The test uses
Thread.Sleep(2000)twice. Per guidelines, should useWaitForElementorVerifyScreenshot(retryTimeout: ...)instead. - Test platform guard:
#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_WINDOWS- test only runs on iOS/Mac, which is appropriate for an iOS-specific fix. - Data URL security: Loading HTML as a data: URL may have different security/sandboxing characteristics than LoadHtmlString with the bundle path as base URL.
PR Discussion
No reviewer comments or disagreements found. No prior agent review found.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #33183 | Use LoadRequest with data:// URL when no baseUrl PENDING (Gate) | MauiWKWebView.cs (+17) |
Original PR fix | provided |
🚦 Gate — Test Verification
📝 Review Session — Update MauiWKWebView.cs · fb5b18b
Result PASSED:
Platform: iOS (iossimulator-arm64)
Mode: Full Verification (RequireFullVerification: true)
Test Results
| Check | Expected | Actual | Result |
|---|---|---|---|
| Tests WITHOUT fix | FAIL | FAIL | |
| Tests WITH fix | PASS | PASS |
Test: Issue30381::WebViewCanGoForwardShouldHaveValueAfterNavigation
- Without fix: Test FAILED on
Assert.That(...CanGoBackLabel..., Is.EqualTo("CanGoBack: True"))- WebView history not tracking HtmlWebViewSource, so CanGoBack was False instead of True. - With fix: Test PASSED - data URL approach correctly creates navigation history entry.
Conclusion
The PR's fix correctly resolves the issue. Tests properly validate the behavior.
🔧 Fix — Analysis & Comparison
📝 Review Session — Update MauiWKWebView.cs · fb5b18b
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix | with temp file. No base64 encoding overhead. | PASS | MauiWKWebView.cs |
Temp files accumulate unless cleanup logic added. |
| 2 | try-fix | PASS | MauiWKWebView.cs |
Clean, no encoding, preserves bundle path as origin. iOS 15+ (matches MAUI minimum). | |
| 3 | try-fix | Custom ( scheme). Registers a scheme handler that serves HTML bytes from in-memory dictionary. | PASS | MauiWKWebView.cs |
Most complex approach (+88 lines, new nested class, LRU eviction). |
| 4 | try-fix | then inject HTML via after . Requires custom navigation delegate subclass. | PASS | MauiWKWebView.cs |
Complex; requires subclassing MauiWebViewNavigationDelegate; has edge cases with atob() encoding. |
| PR | PR #33183 | Base64-encode HTML into URL, load via . | PASS (Gate) | MauiWKWebView.cs (+17) |
Simple and concise. Data URLs have opaque origin (null), which affects relative resource loading differently than bundle path origin. |
Cross-Pollination Round
| Model | Response |
|---|---|
| claude-sonnet-4.5 | NEW IDEA: Local embedded HTTP server (HttpListener) |
| claude-opus-4.6 | NO NEW coverage is exhaustive |
| gpt-5.2 | Blocked (rate limit 429) |
| gpt-5.2-codex | NEW IDEA: WKWebView.LoadData(NSData, MIME, baseURL) |
| gemini-3-pro-preview | Blocked (rate limit 429) |
No new ideas were pursued (local HTTP server is overly complex; LoadData is similar to LoadSimulatedRequest).
Exhausted: Yes (4 models confirmed, 2 rate-limited; all approaches to WKWebView HTML history creation covered)
Selected Fix: PR's fix (data URL It is simple, well-contained, and was Gate-validated. The LoadSimulatedRequest alternative (Attempt 2) is arguably more idiomatic for iOS 15+ but the PR's approach achieves the same result with equivalent code complexity.approach)
Root Cause Analysis
WKWebView.LoadHtmlString() is documented to NOT create back/forward history entries. It loads HTML as a "local" resource that bypasses the navigation stack. The fix uses LoadRequest with a data URI instead, which WKWebView treats as a real URL navigation, creating a history entry that GoBack/GoForward can use.
📋 Report — Final Recommendation
📝 Review Session — Update MauiWKWebView.cs · fb5b18b
Final Recommendation: APPROVE (with minor suggestions)
Summary
PR #33183 fixes WebView GoBack()/GoForward() not working after loading HtmlWebViewSource on iOS. The fix is well-targeted, passes all tests, and has been independently verified by 4 different fix exploration attempts (all 4 passing approaches confirm the root cause diagnosis is correct).
Root Cause
WKWebView.LoadHtmlString() deliberately does NOT create entries in the WKWebView back/forward navigation history list. After calling LoadHtmlString(), any subsequent navigation to a URL makes it impossible to GoBack() to the HTML page because it was never recorded in history.
Fix Quality
PR's approach: When no baseUrl is provided, base64-encode the HTML and load it as a data:text/html;charset=utf-8;base64,... URL via LoadRequest(). This creates a proper navigation history entry because WKWebView treats data: URLs as real URL navigations.
Assessment: Simple, minimal change (+17/-1 lines), backward compatible (baseUrl path preserved), Gate-validated.
Notable alternative found: LoadSimulatedRequest(NSUrlRequest, html) (iOS 15+) is Apple's native API designed exactly for this use case. It has no base64 overhead and preserves bundle path origin for relative resources. It would be a slightly cleaner solution, but the PR's approach is equally correct and functional.
Gate Results
| Check | Result |
|---|---|
| Tests FAIL without fix CanGoBack was False instead of True | |
| Tests PASS with fix All assertions pass |
Issues to Address Before Merge
- Missing NOTE block in PR description (required for all PRs)
Thread.Sleep(2000)in test files - should useWaitForElementor proper async waiting.Thread.Sleepis an anti-pattern per test guidelines.
Fix Candidate Summary
| # | Approach | Result |
|---|---|---|
| PR | data URL base64 via LoadRequest PASS (Gate) | |
| 1 | LoadFileUrl with temp file PASS (cleanup concern) | |
| 2 | LoadSimulatedRequest (Apple native API PASS (arguably cleaner) | ) |
| 3 | Custom WKURLSchemeHandler PASS (complex) | |
| 4 | about:blank + document.write PASS (complex) |
All 4 independent attempts confirmed the root cause diagnosis. PR's fix is the simplest implementation.
📋 Expand PR Finalization Review
Title: ✅ Good
Current: [iOS] Fix WebView GoBack/GoForward not working for HtmlWebViewSource
Description: ✅ Good
Description needs updates. See details below.
✨ Suggested PR Description
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Root Cause
On iOS/MacCatalyst, WKWebView.LoadHtmlString() does not create an entry in the back/forward navigation history list. When HtmlWebViewSource is loaded via LoadHtmlString, the WKWebView has no history record of that page, so GoBack() cannot navigate back to it after the user navigates to a URL.
This does not affect UrlWebViewSource, which loads via LoadRequest() and always creates history entries.
Description of Change
src/Core/src/Platform/iOS/MauiWKWebView.cs — LoadHtml(string? html, string? baseUrl)
The method now branches based on whether a baseUrl is provided:
- With
baseUrl: Continues to useLoadHtmlString(html, baseUrl)unchanged. - Without
baseUrl(theHtmlWebViewSourcedefault): Encodes the HTML as a Base64 data URL and loads it viaLoadRequest(new NSUrlRequest(new NSUrl(dataUrl))). Thedata:URL scheme creates a proper history entry inWKWebView, allowingGoBack()andGoForward()to work correctly.
Behavioral change note: Previously, when no baseUrl was provided, NSBundle.MainBundle.BundlePath was used as the fallback base URL. This allowed HTML content to reference relative local resources (e.g., bundled images or scripts). With the new approach, the data: URL is used instead, which has a null origin — relative local resource links within the HTML will no longer resolve. This tradeoff is intentional to fix navigation history.
Issues Fixed
Fixes #30381
Platforms Affected
- iOS (primary fix)
- MacCatalyst (same code path via
src/Core/src/Platform/iOS/MauiWKWebView.cs)
Platforms Tested
- Android
- Windows
- iOS
- Mac
Code Review: ⚠️ Issues Found
Code Review Findings — PR #33183
🔴 Critical Issues
1. Incorrect #if Conditional Logic in Test File
File: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30381.cs
Problem: The test is wrapped in #if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_WINDOWS. Using && means this test code only compiles when both symbols are defined simultaneously. This is almost certainly unintentional. The comment reads: "Using JavaScript to click the URL is not working on Android and Windows" — meaning the intent is to skip the test on those platforms (run it only on iOS).
The && condition is also semantically backwards from the intent: if TEST_FAILS_ON_ANDROID and TEST_FAILS_ON_WINDOWS are symbols that indicate "we're running on that platform", then && would only include the test when running on both Android AND Windows at the same time (impossible in a single test run).
// Current (likely wrong):
# if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_WINDOWS
// If intent is "run only when NOT on Android AND NOT on Windows":
#if !TEST_FAILS_ON_ANDROID && !TEST_FAILS_ON_WINDOWSPer the UI test guidelines, inline #if directives in test methods should be avoided in favour of platform-specific extension methods. However, if #if is used here, the logic must be correct.
Recommendation: Verify the intended behaviour and correct the conditional. Check how similar tests in the codebase gate iOS-only behaviour. Also consider using PlatformAffected.iOS on the [Issue] attribute (already done in the HostApp) and platform-specific [Ignore] attributes instead of #if.
🟡 Suggestions
2. Thread.Sleep() Calls in Test
File: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30381.cs
Problem: Two Thread.Sleep(2000) calls are used to wait for navigation to complete. Per UI test guidelines:
"AVOID: Adding
Task.Delay()orThread.Sleep()before interactions — useApp.WaitForElement()with timeout instead."
// Current:
Thread.Sleep(2000);
App.Tap("UpdateStatusButton");
Assert.That(App.FindElement("CanGoBackLabel").GetText(), Is.EqualTo("CanGoBack: True"));
// Better:
App.WaitForElement("CanGoBackLabel", timeout: TimeSpan.FromSeconds(5));
// or poll label text with a helperRecommendation: Replace Thread.Sleep with App.WaitForElement() for element readiness. If waiting for async navigation to settle before asserting label text, consider polling until the expected value appears.
3. External URL Dependency in Test
File: src/Controls/tests/TestCases.HostApp/Issues/Issue30381.cs
Problem: The test HTML references an external live URL (https://github.com/dotnet/maui) as the navigation target:
<a href='https://github.com/dotnet/maui' id='testLink'>here</a>Per UI test guidelines:
"For WebView failures: External URL/network — Use mock URLs instead of external URLs."
This creates a network dependency that can cause flaky test failures in environments without internet access (CI, offline development).
Recommendation: Use a second HtmlWebViewSource (a second local page loaded programmatically on link click) to avoid network dependency. This would also make the test more deterministic.
4. Missing Newline at End of Files
Files:
src/Controls/tests/TestCases.HostApp/Issues/Issue30381.cssrc/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30381.cs
Both files are missing a trailing newline (No newline at end of file). This is a minor style issue but triggers dotnet format warnings.
✅ Looks Good
- Core fix logic is correct: Using
LoadRequestwith adata:URL is a valid technique to create WKWebView history entries. The approach is well-documented in comments within the code. - Conditional split on
baseUrl: Preserving the existingLoadHtmlStringpath when abaseUrlIS provided is the right approach to avoid unintended regressions for users who specify a base URL. - File placement: Fix is correctly placed in
src/Core/src/Platform/iOS/MauiWKWebView.cs(iOS/MacCatalyst platform layer). - HostApp test page:
Issue30381.csin TestCases.HostApp follows the C#-only page convention, includes appropriateAutomationIdvalues, and uses the[Issue]attribute correctly. - Test category:
[Category(UITestCategories.WebView)]is appropriate.
There was a problem hiding this comment.
Pull request overview
Fixes iOS (and MacCatalyst) WebView back/forward navigation for HtmlWebViewSource by ensuring HTML loads create navigation history entries, and adds a corresponding issue reproduction page + UI test.
Changes:
- Updated iOS
MauiWKWebView.LoadHtmlto load HTML via aLoadRequestpath intended to populate WKWebView history. - Added HostApp issue page
Issue30381to reproduce navigation/back/forward behavior. - Added an Appium UI test for the scenario (
Issue30381.cs).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/Core/src/Platform/iOS/MauiWKWebView.cs | Changes the iOS HTML-loading implementation to try to create WKWebView back/forward history entries. |
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30381.cs | Adds a UI test validating CanGoBack/CanGoForward transitions for the repro scenario. |
| src/Controls/tests/TestCases.HostApp/Issues/Issue30381.cs | Adds a HostApp reproduction page for the issue (HTML -> external URL -> back/forward). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
kubaflo
left a comment
There was a problem hiding this comment.
Could you check the copilot comments?
| WebView MyWebView; | ||
| Label CanGoBackLabel; | ||
| Label CanGoForwardLabel; | ||
| Button ClickLinkButton; | ||
| Button GoBackButton; | ||
| Button GoForwardButton; | ||
| Button UpdateStatusButton; |
This comment has been minimized.
This comment has been minimized.
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 2 findings
See inline comments for details.
| <body> | ||
| <h1>Welcome to Wikipedia</h1> | ||
| <p>Wikipedia is a free online encyclopedia.</p> | ||
| <p>Read more <a href='https://github.com/dotnet/maui' id='testLink'>here</a>.</p> |
There was a problem hiding this comment.
🔍 AI-Generated Review (multi-model)
[major] Regression Prevention and Test Coverage — This UI test navigates the WebView to a live GitHub URL, so the regression depends on external network availability, TLS/DNS, and GitHub response behavior. Please make the navigation deterministic by using a local/mock URL or bundled test page that still creates a back/forward entry; otherwise this can fail in CI for reasons unrelated to the WebView history fix.
| { | ||
| App.WaitForElement("ClickLinkButton"); | ||
| // Wait for the WebView to load the initial content before clicking the link | ||
| Thread.Sleep(1000); |
There was a problem hiding this comment.
🔍 AI-Generated Review (multi-model)
[moderate] UI Test Quality — A fixed 1s sleep does not prove the HtmlWebViewSource content has loaded before ClickLinkButton runs JavaScript against testLink; slower devices can still execute the script before the element exists. Please expose a deterministic loaded/status signal from the page (for example set a label from Navigated) and wait for that instead of sleeping.
MauiBot
left a comment
There was a problem hiding this comment.
AI Review Summary
@devanathan-vaithiyanathan — new AI review results are available based on this last commit:
9bb4504. To request a fresh review after new comments or commits, comment/review rerun.
🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix
Gate Result: ✅ PASSED
Platform: IOS · Base: main · Merge base: 5535b43c
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🖥️ Issue30381 Issue30381 |
✅ FAIL — 330s | ✅ PASS — 115s |
🔴 Without fix — 🖥️ Issue30381: FAIL ✅ · 330s
Determining projects to restore...
Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 561 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 554 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 6.2 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/Foldable/src/Controls.Foldable.csproj (in 6.43 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj (in 6.44 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/Maps/src/Controls.Maps.csproj (in 6.44 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Core/maps/src/Maps.csproj (in 6.45 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 6.44 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Xaml/Controls.Xaml.csproj (in 6.45 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj (in 6.47 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 6.46 sec).
/Users/cloudtest/vss/_work/1/s/.dotnet/packs/Microsoft.iOS.Sdk.net10.0_26.0/26.0.11017/targets/Xamarin.Shared.Sdk.targets(309,3): warning : RuntimeIdentifier was set on the command line, and will override the value for RuntimeIdentifiers set in the project file. [/Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-ios]
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Debug/net10.0-ios26.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Debug/net10.0-ios26.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Debug/net10.0-ios26.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.dll
Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Maps/Debug/net10.0-ios26.0/Microsoft.Maui.Maps.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Microsoft.AspNetCore.Components.WebView.Maui -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-ios26.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Foldable -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Foldable.dll
Controls.Xaml -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Xaml.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Controls.Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Maps.dll
Detected signing identity:
Code Signing Key: "" (-)
Provisioning Profile: "" () - no entitlements
Bundle Id: com.microsoft.maui.uitests
App Id: com.microsoft.maui.uitests
Controls.TestCases.HostApp -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-ios/iossimulator-arm64/Controls.TestCases.HostApp.dll
Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
Optimizing assemblies for size. This process might take a while.
Build succeeded.
/Users/cloudtest/vss/_work/1/s/.dotnet/packs/Microsoft.iOS.Sdk.net10.0_26.0/26.0.11017/targets/Xamarin.Shared.Sdk.targets(309,3): warning : RuntimeIdentifier was set on the command line, and will override the value for RuntimeIdentifiers set in the project file. [/Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-ios]
1 Warning(s)
0 Error(s)
Time Elapsed 00:02:24.18
Determining projects to restore...
Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.Core/UITest.Core.csproj (in 744 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/VisualTestUtils/VisualTestUtils.csproj (in 744 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/tests/CustomAttributes/Controls.CustomAttributes.csproj (in 744 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 765 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 744 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 744 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 894 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 664 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.NUnit/UITest.NUnit.csproj (in 1.53 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj (in 1.91 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.Analyzers/UITest.Analyzers.csproj (in 2.85 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/VisualTestUtils.MagickNet/VisualTestUtils.MagickNet.csproj (in 2.65 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj (in 3.5 sec).
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Controls.CustomAttributes -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
UITest.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
UITest.NUnit -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
VisualTestUtils -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
VisualTestUtils.MagickNet -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Appium -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
UITest.Analyzers -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
Controls.TestCases.iOS.Tests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
Test run for /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (arm64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.05] Discovering: Controls.TestCases.iOS.Tests
[xUnit.net 00:00:00.16] Discovered: Controls.TestCases.iOS.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 7/9/2026 5:01:11 AM FixtureSetup for Issue30381(iOS)
>>>>> 7/9/2026 5:01:15 AM WebViewCanGoForwardShouldHaveValueAfterNavigation Start
>>>>> 7/9/2026 5:02:14 AM WebViewCanGoForwardShouldHaveValueAfterNavigation Stop
>>>>> 7/9/2026 5:02:14 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed WebViewCanGoForwardShouldHaveValueAfterNavigation [1 m 3 s]
Error Message:
Assert.That(App.FindElement("CanGoBackLabel").GetText(), Is.EqualTo("CanGoBack: True"))
Expected string length 15 but was 16. Strings differ at index 11.
Expected: "CanGoBack: True"
But was: "CanGoBack: False"
----------------------^
Stack Trace:
at Microsoft.Maui.TestCases.Tests.Issues.Issue30381.WebViewCanGoForwardShouldHaveValueAfterNavigation() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30381.cs:line 41
1) at Microsoft.Maui.TestCases.Tests.Issues.Issue30381.WebViewCanGoForwardShouldHaveValueAfterNavigation() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30381.cs:line 41
NUnit Adapter 4.5.0.0: Test execution complete
Results File: /Users/cloudtest/vss/_work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue30381.trx
Total tests: 1
Failed: 1
Test Run Failed.
Total time: 2.3028 Minutes
>>> TRX_RESULT_FILE: /Users/cloudtest/vss/_work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue30381.trx
🟢 With fix — 🖥️ Issue30381: PASS ✅ · 115s
Determining projects to restore...
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 345 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 359 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 365 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 409 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 422 ms).
6 of 11 projects are up-to-date for restore.
/Users/cloudtest/vss/_work/1/s/.dotnet/packs/Microsoft.iOS.Sdk.net10.0_26.0/26.0.11017/targets/Xamarin.Shared.Sdk.targets(309,3): warning : RuntimeIdentifier was set on the command line, and will override the value for RuntimeIdentifiers set in the project file. [/Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-ios]
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Debug/net10.0-ios26.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Debug/net10.0-ios26.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Debug/net10.0-ios26.0/Microsoft.Maui.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Maps/Debug/net10.0-ios26.0/Microsoft.Maui.Maps.dll
Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Controls.Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Maps.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-ios26.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Xaml -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Xaml.dll
Controls.Foldable -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Foldable.dll
Detected signing identity:
Code Signing Key: "" (-)
Provisioning Profile: "" () - no entitlements
Bundle Id: com.microsoft.maui.uitests
App Id: com.microsoft.maui.uitests
Controls.TestCases.HostApp -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-ios/iossimulator-arm64/Controls.TestCases.HostApp.dll
Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
Optimizing assemblies for size. This process might take a while.
Build succeeded.
/Users/cloudtest/vss/_work/1/s/.dotnet/packs/Microsoft.iOS.Sdk.net10.0_26.0/26.0.11017/targets/Xamarin.Shared.Sdk.targets(309,3): warning : RuntimeIdentifier was set on the command line, and will override the value for RuntimeIdentifiers set in the project file. [/Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-ios]
1 Warning(s)
0 Error(s)
Time Elapsed 00:00:51.06
Determining projects to restore...
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 352 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 382 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 382 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 396 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 411 ms).
8 of 13 projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Controls.CustomAttributes -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14610153
Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
UITest.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
VisualTestUtils -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
UITest.Appium -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
UITest.NUnit -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
VisualTestUtils.MagickNet -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Analyzers -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
Controls.TestCases.iOS.Tests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
Test run for /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (arm64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.06] Discovering: Controls.TestCases.iOS.Tests
[xUnit.net 00:00:00.17] Discovered: Controls.TestCases.iOS.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 7/9/2026 5:03:56 AM FixtureSetup for Issue30381(iOS)
>>>>> 7/9/2026 5:04:00 AM WebViewCanGoForwardShouldHaveValueAfterNavigation Start
>>>>> 7/9/2026 5:04:15 AM WebViewCanGoForwardShouldHaveValueAfterNavigation Stop
Passed WebViewCanGoForwardShouldHaveValueAfterNavigation [14 s]
NUnit Adapter 4.5.0.0: Test execution complete
Results File: /Users/cloudtest/vss/_work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue30381.trx
Test Run Successful.
Total tests: 1
Passed: 1
Total time: 35.5177 Seconds
>>> TRX_RESULT_FILE: /Users/cloudtest/vss/_work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue30381.trx
📁 Fix files reverted (1 files)
src/Core/src/Platform/iOS/MauiWKWebView.cs
📱 UI Tests — ViewBaseTests,WebView
Detected UI test categories: ViewBaseTests,WebView
❌ Deep UI tests — 53 passed, 108 failed across 2 categories on platform-pool agent (replaces in-process counts above).
🧪 UI Test Execution Results (deep, platform pool)
| Category | Tests | Snapshot diffs |
|---|---|---|
ViewBaseTests |
13/112 (99 ❌) | 198 diff PNGs |
WebView |
40/50 (9 ❌) | 18 diff PNGs |
❌ ViewBaseTests — 99 failed tests
BoxView_ClipWithCornerRadius
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ClipFeatureTests.BoxView_ClipWithCornerRadius() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ClipFeatureTests.cs:line 176
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.Ru
...
ImageButton_ClipWithScale
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ClipFeatureTests.ImageButton_ClipWithScale() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ClipFeatureTests.cs:line 948
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.Runti
...
ContentView_ClipWithRoundRectangleGeometry
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ClipFeatureTests.ContentView_ClipWithRoundRectangleGeometry() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ClipFeatureTests.cs:line 565
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System
...
ImageButton_ClipWithEllipseGeometry
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ClipFeatureTests.ImageButton_ClipWithEllipseGeometry() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ClipFeatureTests.cs:line 625
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflec
...
VerifyBackgroundColorSet
System.InvalidOperationException :
Snapshot different than baseline: VerifyBackgroundColorSet.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0
Then run the tests targeting the new simulator.
----> VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyBackgroundColorSet.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or dow
...
DarkTheme_Editor_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.AppThemeFeatureTests.DarkTheme_Editor_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/AppThemeFeatureTests.cs:line 286
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System
...
LightTheme_RadioButton_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.AppThemeFeatureTests.LightTheme_RadioButton_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/AppThemeFeatureTests.cs:line 114
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
BoxView_ClipWithColorGreen
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ClipFeatureTests.BoxView_ClipWithColorGreen() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ClipFeatureTests.cs:line 156
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.Runt
...
Image_ClipWithQuadraticBezierSegmentPath
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ClipFeatureTests.Image_ClipWithQuadraticBezierSegmentPath() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ClipFeatureTests.cs:line 431
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.R
...
VisualTransform_Scale
System.InvalidOperationException :
Snapshot different than baseline: VisualTransform_Scale.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0
Then run the tests targeting the new simulator.
----> VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VisualTransform_Scale.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download
...
ImageButton_ClipWithRectangleGeometry
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ClipFeatureTests.ImageButton_ClipWithRectangleGeometry() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ClipFeatureTests.cs:line 609
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Refl
...
DarkTheme_SearchBar_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.AppThemeFeatureTests.DarkTheme_SearchBar_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/AppThemeFeatureTests.cs:line 266
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at Sys
...
ContentView_ClipNull_NoCrash
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ClipFeatureTests.ContentView_ClipNull_NoCrash() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ClipFeatureTests.cs:line 785
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.Ru
...
DefaultContentWithBackgroundColor
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ContentViewFeatureTests.DefaultContentWithBackgroundColor() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ContentViewFeatureTests.cs:line 106
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at S
...
DefaultContentWithShadow
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ContentViewFeatureTests.DefaultContentWithShadow() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ContentViewFeatureTests.cs:line 146
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Ref
...
VisualTransform_AnchorX_ScaleYWithRotation
System.InvalidOperationException :
Snapshot different than baseline: VisualTransform_AnchorX_ScaleYWithRotation.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0
Then run the tests targeting the new simulator.
----> VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VisualTransform_AnchorX_ScaleYWithRotation.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseli
...
VisualTransform_ScaleWithAnchorXAndRotationY
System.InvalidOperationException :
Snapshot different than baseline: VisualTransform_ScaleWithAnchorXAndRotationY.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0
Then run the tests targeting the new simulator.
----> VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VisualTransform_ScaleWithAnchorXAndRotationY.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the ba
...
ContentView_ClipWithRectangleGeometry
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ClipFeatureTests.ContentView_ClipWithRectangleGeometry() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ClipFeatureTests.cs:line 533
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Refl
...
ContentView_ClipWithEllipseGeometry
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ClipFeatureTests.ContentView_ClipWithEllipseGeometry() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ClipFeatureTests.cs:line 549
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflec
...
VisualTransform_RotationY
System.InvalidOperationException :
Snapshot different than baseline: VisualTransform_RotationY.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0
Then run the tests targeting the new simulator.
----> VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VisualTransform_RotationY.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or d
...
Border_ClipWithStrokeShapeRoundRectangle
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ClipFeatureTests.Border_ClipWithStrokeShapeRoundRectangle() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ClipFeatureTests.cs:line 109
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.R
...
Image_ClipWithRoundRectangleGeometry
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ClipFeatureTests.Image_ClipWithRoundRectangleGeometry() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ClipFeatureTests.cs:line 319
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Refle
...
Image_ClipWithPolyBezierSegmentPath
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ClipFeatureTests.Image_ClipWithPolyBezierSegmentPath() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ClipFeatureTests.cs:line 415
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflec
...
VisualTransform_ScaleX
System.InvalidOperationException :
Snapshot different than baseline: VisualTransform_ScaleX.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0
Then run the tests targeting the new simulator.
----> VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VisualTransform_ScaleX.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or downloa
...
LightTheme_DatePicker_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.AppThemeFeatureTests.LightTheme_DatePicker_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/AppThemeFeatureTests.cs:line 86
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
SecondCustomPageWithFlowDirectionChanged
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ContentViewFeatureTests.SecondCustomPageWithFlowDirectionChanged() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ContentViewFeatureTests.cs:line 333
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
...
Border_ClipWithStrokeThickness
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ClipFeatureTests.Border_ClipWithStrokeThickness() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ClipFeatureTests.cs:line 52
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.R
...
Image_ClipWithLineSegmentPath
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ClipFeatureTests.Image_ClipWithLineSegmentPath() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ClipFeatureTests.cs:line 351
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.R
...
DarkTheme_SearchBarAndPlaceholderColor_VerifyVisualState
System.InvalidOperationException :
Snapshot different than baseline: DarkTheme_SearchBarAndPlaceholderColor_VerifyVisualState.png (size differs - baseline is 1124x1126 pixels, actual is 1206x1312 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0
Then run the tests targeting the new simulator.
----> VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: DarkTheme_SearchBarAndPlaceholderColor_VerifyVisualState.png (size differs - baseline is 1124x1126 pixels, actual is 1206x1312 pixels)
If the correct baseline has changed (this isn't a a
...
LightTheme_SearchBar_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.AppThemeFeatureTests.LightTheme_SearchBar_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/AppThemeFeatureTests.cs:line 256
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at Sy
...
(+69 more — see TRX in artifact)
❌ WebView — 9 failed tests
WebViewWithDarkTheme
System.InvalidOperationException :
Snapshot different than baseline: WebViewWithDarkTheme.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0
Then run the tests targeting the new simulator.
----> VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: WebViewWithDarkTheme.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download th
...
VerifyWebViewWithShadow
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.WebViewFeatureTests.VerifyWebViewWithShadow() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/WebViewFeatureTests.cs:line 310
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.R
...
WebViewBackgroundColorShouldBeApplied
System.InvalidOperationException :
Snapshot different than baseline: WebViewBackgroundColorShouldBeApplied.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0
Then run the tests targeting the new simulator.
----> VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: WebViewBackgroundColorShouldBeApplied.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
...
VerifyWebViewBackgroundColor
System.InvalidOperationException :
Snapshot different than baseline: VerifyWebViewBackgroundColor.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0
Then run the tests targeting the new simulator.
----> VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyWebViewBackgroundColor.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachmen
...
WebViewWithLightTheme
System.InvalidOperationException :
Snapshot different than baseline: WebViewWithLightTheme.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0
Then run the tests targeting the new simulator.
----> VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: WebViewWithLightTheme.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download
...
VerifyHybridWebViewWithShadow
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.HybridWebViewFeatureTests.VerifyHybridWebViewWithShadow() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/HybridWebViewFeatureTests.cs:line 126
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
VerifyWebViewDynamicBackgroundColor
System.InvalidOperationException :
Snapshot different than baseline: VerifyWebViewDynamicBackgroundColor.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0
Then run the tests targeting the new simulator.
----> VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyWebViewDynamicBackgroundColor.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See
...
WebViewShouldNotMirrored
System.InvalidOperationException :
Snapshot different than baseline: WebViewShouldNotMirrored.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0
Then run the tests targeting the new simulator.
----> VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: WebViewShouldNotMirrored.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or dow
...
ValidateWebViewScreenshot
System.InvalidOperationException :
Snapshot different than baseline: ValidateWebViewScreenshot.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0
Then run the tests targeting the new simulator.
----> VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: ValidateWebViewScreenshot.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or d
...
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)
📋 Pre-Flight — Context & Validation
Issue: #30381 - WebView GoBack/GoForward not working for HtmlWebViewSource on iOS
PR: #33183 - [iOS] Fix WebView GoBack/GoForward not working for HtmlWebViewSource
Platforms Affected: iOS, MacCatalyst
Files Changed: 1 implementation, 2 test
Key Findings
- Issue #30381 reports that iOS/MacCatalyst
HtmlWebViewSourcecontent loaded withLoadHtmlString()is not retained in WebKit history, so after navigating from inline HTML to an external URL,GoBack()cannot return to the HTML content. - PR #33183 changes
MauiWKWebView.LoadHtmlto useLoadSimulatedRequeston iOS/MacCatalyst 15+ and falls back toLoadHtmlStringon older OS versions. - Added UI coverage in
Issue30381, categorized asWebView, but the test currently depends on an external GitHub URL and uses an arbitrary sleep. - GitHub CLI was unauthenticated in this environment; PR/issue metadata came from public API/local checkout, and required-check status remained undetermined.
Code Review Summary
Verdict: NEEDS_CHANGES
Confidence: low
Errors: 0 | Warnings: 1 | Suggestions: 1
Key code review findings:
- ⚠
src/Controls/tests/TestCases.HostApp/Issues/Issue30381.cs:116/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30381.cs:25-26— regression test depends on external network/GitHub, a known WebView UI-test flakiness anti-pattern. - ℹ
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30381.cs:32-42— consider asserting the actual navigation target/content after back and forward, not onlyCanGoBack/CanGoForwardlabels.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #33183 | Use iOS/MacCatalyst 15+ WKWebView.LoadSimulatedRequest with resolved base URL, fallback to LoadHtmlString on older OS versions |
✅ PASSED (Gate) | src/Core/src/Platform/iOS/MauiWKWebView.cs, Issue30381 UI test files |
Original PR |
🔬 Code Review — Deep Analysis
Code Review — PR #33183
Independent Assessment
What this changes: iOS/MacCatalyst HtmlWebViewSource now loads via WKWebView.LoadSimulatedRequest on OS 15+ so the generated HTML document enters WKWebView history; older OS versions fall back to LoadHtmlString. Adds an iOS/MacCatalyst UI regression test.
Inferred motivation: Fix GoBack/GoForward after navigating from inline HTML to another page.
Reconciliation with PR Narrative
Author claims: LoadHtmlString does not create history entries; LoadSimulatedRequest does, with fallback for older OS versions.
Agreement/disagreement: This matches the implementation. The current code also appears to address prior data-URL/BaseUrl concerns.
Prior Review Reconciliation
| Prior ❌ Error Finding | Source | Status | Evidence |
|---|---|---|---|
Non-empty BaseUrl still used LoadHtmlString |
MauiBot inline | ✅ Fixed | Current MauiWKWebView.cs:104-120 resolves base URL then uses LoadSimulatedRequest for all HTML on iOS/MacCatalyst 15+. |
| Data URL broke relative resources / leaked HTML in URL | MauiBot inline/comments | ✅ Fixed | Current code no longer builds a data: URL; it keeps an NSUrlRequest based on resolved base URL. |
| Missing iOS 15 availability guard | MauiBot inline | ✅ Fixed | Current MauiWKWebView.cs:118-124 guards and falls back. |
#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_WINDOWS claimed incorrect |
Prior issue comment | 🔄 Obsolete / not applicable | Test csproj constants show this compiles on iOS/MacCatalyst and excludes Android/Windows. |
| External URL in UI test | MauiBot/Copilot inline | ❌ Unresolved | Current test still navigates to https://github.com/dotnet/maui at Issue30381.cs:116. |
Blast Radius Assessment
- Runs for all iOS/MacCatalyst WebViews using
HtmlWebViewSourceon OS 15+. - Startup impact: no; only during WebView source load.
- Static/shared state: no new state.
- Platform handler/UI plumbing: confidence capped at medium before CI; low after required-check tool gap.
CI Status
- Required-check result: undetermined —
gh pr checks --requiredfailed becauseghis unauthenticated. - Public check-run API for head
9bb45040d8...:maui-prand visible build/integration checks show success; one unrelatedBump global.jsonskipped. - Classification: required-gate coverage not verified.
- Action taken: confidence capped at low; no GitHub comments/reviews posted.
Findings
⚠️ Warning — UI test depends on external network/GitHub
src/Controls/tests/TestCases.HostApp/Issues/Issue30381.cs:116 and src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30381.cs:25-26
The regression test navigates the embedded WebView to https://github.com/dotnet/maui. That makes the test depend on DNS/network/GitHub availability, redirects, and page-load timing instead of just MAUI WebView history behavior. The UI test guidance explicitly calls external WebView URLs a flaky-test anti-pattern. Use a deterministic local/bundled/data target for the second history entry.
💡 Suggestion — Assert actual back/forward navigation target
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30381.cs:32-42
The test verifies only CanGoBack/CanGoForward label state. Consider also exposing/asserting the current navigated URL or visible page marker after GoBack and GoForward so the test proves the original HTML content is restored.
Failure-Mode Probing
- Null
BaseUrl: resolves to bundle path, preserving previous relative-resource base while adding history on OS 15+. - Explicit
BaseUrl: now also uses history-producing path; prior incomplete-BaseUrl issue appears fixed. - iOS/MacCatalyst <15: falls back without crash, but original history limitation remains.
- Offline CI/test device: current regression test can fail even if handler code is correct.
Verdict: NEEDS_CHANGES
Confidence: low
Summary: The handler approach looks sound for iOS/MacCatalyst 15+, and prior major implementation issues appear addressed. However, the added regression test still uses an external GitHub URL, a concrete flakiness risk previously flagged and still unresolved; required CI status also could not be verified via gh.
🛠️ Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix | Use WKWebView.LoadData with UTF-8 HTML data and the resolved base URL |
❌ Fail | 1 file | Built successfully, but final forward navigation left CanGoBack: False; LoadData does not provide full history semantics. |
| 2 | try-fix | Write HTML to a temporary .html file and load it via LoadFileUrl |
✅ Pass | 1 file | Narrow test passed, but changes origin/base URL to file://, risking relative resources, cookies, local storage, and BaseUrl compatibility. |
| 3 | try-fix | Append a JavaScript history.pushState shim while keeping LoadHtmlString |
❌ Fail | 1 file | Failed with the same final CanGoBack: False assertion and mutates arbitrary user HTML. |
| PR | PR #33183 | Use iOS/MacCatalyst 15+ LoadSimulatedRequest with the resolved base URL, fallback to LoadHtmlString |
✅ PASSED (Gate) | 3 files | Preserves base URL/origin semantics while using a WebKit API that creates a real history entry. |
Cross-Pollination
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| gpt-5.5 / maui-expert-reviewer | 1 | Yes | Suggested LoadData, temp-file backed navigation, and MAUI-managed/synthetic history strategies. |
| gpt-5.5 / maui-expert-reviewer | 2 | No | After seeing attempts 1-3, concluded: NO NEW IDEAS — LoadSimulatedRequest is the only public WKWebView API here that preserves BaseUrl/origin while creating a real main-resource history entry; other paths are tested-bad, origin-changing, JS shims, or private API. |
Exhausted: Yes
Selected Fix: PR #33183 — It is the only tested/available approach that both passes the gate and preserves HtmlWebViewSource.BaseUrl/origin compatibility. Candidate #2 passed the narrow regression but is not better because it changes document origin and resource/cookie behavior.
🏁 Report — Final Recommendation
Comparative Report — PR #33183
Candidate ranking
| Rank | Candidate | Regression result | Assessment |
|---|---|---|---|
| 1 | pr-plus-reviewer |
✅ Inherits passing PR gate | Best candidate. Preserves the PR's LoadSimulatedRequest handler fix and applies expert reviewer feedback to make the UI regression test deterministic by removing the live GitHub URL and fixed sleep. |
| 2 | pr |
✅ Passed gate | Best implementation-only fix. Uses the public WebKit API that creates a native history item while preserving HtmlWebViewSource.BaseUrl/origin semantics and falling back safely on older OS versions. Ranked below pr-plus-reviewer only because its added test still has avoidable flakiness. |
| 3 | try-fix-2 |
✅ Passed narrow regression | Creates history by loading a temp .html file through LoadFileUrl, but changes the document origin/base URL to file://. That risks regressions for relative resources, cookies, local storage, and non-null BaseUrl, so it is less compatible than the PR fix despite passing the narrow test. |
| 4 | try-fix-1 |
❌ Failed regression | Replaces LoadHtmlString with LoadData, but the iOS regression still failed; candidates that fail regression tests must rank below passing candidates. |
| 5 | try-fix-3 |
❌ Failed regression | Appends a JavaScript history.pushState shim, but the iOS regression still failed and the approach mutates arbitrary user HTML. |
Comparative analysis
The raw PR fix is the strongest implementation approach. It directly targets the WebKit behavior causing the bug: LoadHtmlString() does not create the needed native back/forward history entry for inline HTML, while LoadSimulatedRequest() can create that entry on iOS/MacCatalyst 15+. Unlike the temp-file approach, it keeps the resolved base URL as the document request URL, preserving existing HtmlWebViewSource.BaseUrl behavior.
pr-plus-reviewer keeps that implementation unchanged and improves only the regression coverage. The expert reviewer found that the current test depends on https://github.com/dotnet/maui and sleeps for one second before executing JavaScript. The sandbox candidate replaces the live URL with deterministic local data content and adds a page status signal so the Appium test waits for observable WebView load state instead of timing.
The try-fix candidates do not beat the PR path. try-fix-1 and try-fix-3 failed the regression test and therefore must rank below passing candidates. try-fix-2 passed the narrow test but changes origin/base URL semantics in a way that is likely to regress legitimate HtmlWebViewSource scenarios.
Winner
Winner: pr-plus-reviewer
Rationale: It combines the only compatibility-preserving, passing handler fix with the expert reviewer's actionable test-hardening feedback. This produces the best overall candidate for correctness and maintainability.
🧭 Next Steps — review latest findings
No alternative fix was selected for this run. Review the session findings and CI results before merging.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
…33183) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details On iOS, LoadHtml uses LoadHtmlString(), which does not add the HTML page to WebView history. Because of this, GoBack() cannot navigate back after loading HTML. ### Description of Change <!-- Enter description of the fix in this section --> MauiWKWebView.cs — Replaced LoadHtmlString() with LoadSimulatedRequest() (iOS 15+ / MacCatalyst 15+). This method loads the HTML content while creating a proper WKWebView back/forward history entry, enabling GoBack()/GoForward() to work correctly. For iOS 13/14 and earlier MacCatalyst, the implementation falls back to LoadHtmlString() to preserve compatibility. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #30381 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [x] Android - [x] Windows - [x] iOS - [x] Mac | Before | After | |---------|--------| | **iOS**<br> <video src="https://github.com/user-attachments/assets/1b328f84-c5d4-4b6f-a2b3-bbffbf338895" width="300" height="600"> | **iOS**<br> <video src="https://github.com/user-attachments/assets/4ca2e343-b452-4958-afd3-b8f1ff5eafde" width="300" height="600"> |
…33183) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details On iOS, LoadHtml uses LoadHtmlString(), which does not add the HTML page to WebView history. Because of this, GoBack() cannot navigate back after loading HTML. ### Description of Change <!-- Enter description of the fix in this section --> MauiWKWebView.cs — Replaced LoadHtmlString() with LoadSimulatedRequest() (iOS 15+ / MacCatalyst 15+). This method loads the HTML content while creating a proper WKWebView back/forward history entry, enabling GoBack()/GoForward() to work correctly. For iOS 13/14 and earlier MacCatalyst, the implementation falls back to LoadHtmlString() to preserve compatibility. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #30381 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [x] Android - [x] Windows - [x] iOS - [x] Mac | Before | After | |---------|--------| | **iOS**<br> <video src="https://github.com/user-attachments/assets/1b328f84-c5d4-4b6f-a2b3-bbffbf338895" width="300" height="600"> | **iOS**<br> <video src="https://github.com/user-attachments/assets/4ca2e343-b452-4958-afd3-b8f1ff5eafde" width="300" height="600"> |
…33183) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details On iOS, LoadHtml uses LoadHtmlString(), which does not add the HTML page to WebView history. Because of this, GoBack() cannot navigate back after loading HTML. ### Description of Change <!-- Enter description of the fix in this section --> MauiWKWebView.cs — Replaced LoadHtmlString() with LoadSimulatedRequest() (iOS 15+ / MacCatalyst 15+). This method loads the HTML content while creating a proper WKWebView back/forward history entry, enabling GoBack()/GoForward() to work correctly. For iOS 13/14 and earlier MacCatalyst, the implementation falls back to LoadHtmlString() to preserve compatibility. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #30381 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [x] Android - [x] Windows - [x] iOS - [x] Mac | Before | After | |---------|--------| | **iOS**<br> <video src="https://github.com/user-attachments/assets/1b328f84-c5d4-4b6f-a2b3-bbffbf338895" width="300" height="600"> | **iOS**<br> <video src="https://github.com/user-attachments/assets/4ca2e343-b452-4958-afd3-b8f1ff5eafde" width="300" height="600"> |
…33183) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details On iOS, LoadHtml uses LoadHtmlString(), which does not add the HTML page to WebView history. Because of this, GoBack() cannot navigate back after loading HTML. ### Description of Change <!-- Enter description of the fix in this section --> MauiWKWebView.cs — Replaced LoadHtmlString() with LoadSimulatedRequest() (iOS 15+ / MacCatalyst 15+). This method loads the HTML content while creating a proper WKWebView back/forward history entry, enabling GoBack()/GoForward() to work correctly. For iOS 13/14 and earlier MacCatalyst, the implementation falls back to LoadHtmlString() to preserve compatibility. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #30381 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [x] Android - [x] Windows - [x] iOS - [x] Mac | Before | After | |---------|--------| | **iOS**<br> <video src="https://github.com/user-attachments/assets/1b328f84-c5d4-4b6f-a2b3-bbffbf338895" width="300" height="600"> | **iOS**<br> <video src="https://github.com/user-attachments/assets/4ca2e343-b452-4958-afd3-b8f1ff5eafde" width="300" height="600"> |
…33183) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details On iOS, LoadHtml uses LoadHtmlString(), which does not add the HTML page to WebView history. Because of this, GoBack() cannot navigate back after loading HTML. ### Description of Change <!-- Enter description of the fix in this section --> MauiWKWebView.cs — Replaced LoadHtmlString() with LoadSimulatedRequest() (iOS 15+ / MacCatalyst 15+). This method loads the HTML content while creating a proper WKWebView back/forward history entry, enabling GoBack()/GoForward() to work correctly. For iOS 13/14 and earlier MacCatalyst, the implementation falls back to LoadHtmlString() to preserve compatibility. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #30381 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [x] Android - [x] Windows - [x] iOS - [x] Mac | Before | After | |---------|--------| | **iOS**<br> <video src="https://github.com/user-attachments/assets/1b328f84-c5d4-4b6f-a2b3-bbffbf338895" width="300" height="600"> | **iOS**<br> <video src="https://github.com/user-attachments/assets/4ca2e343-b452-4958-afd3-b8f1ff5eafde" width="300" height="600"> |
…33183) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details On iOS, LoadHtml uses LoadHtmlString(), which does not add the HTML page to WebView history. Because of this, GoBack() cannot navigate back after loading HTML. ### Description of Change <!-- Enter description of the fix in this section --> MauiWKWebView.cs — Replaced LoadHtmlString() with LoadSimulatedRequest() (iOS 15+ / MacCatalyst 15+). This method loads the HTML content while creating a proper WKWebView back/forward history entry, enabling GoBack()/GoForward() to work correctly. For iOS 13/14 and earlier MacCatalyst, the implementation falls back to LoadHtmlString() to preserve compatibility. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #30381 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [x] Android - [x] Windows - [x] iOS - [x] Mac | Before | After | |---------|--------| | **iOS**<br> <video src="https://github.com/user-attachments/assets/1b328f84-c5d4-4b6f-a2b3-bbffbf338895" width="300" height="600"> | **iOS**<br> <video src="https://github.com/user-attachments/assets/4ca2e343-b452-4958-afd3-b8f1ff5eafde" width="300" height="600"> |
Issue Details
On iOS, LoadHtml uses LoadHtmlString(), which does not add the HTML page to WebView history.
Because of this, GoBack() cannot navigate back after loading HTML.
Description of Change
MauiWKWebView.cs — Replaced LoadHtmlString() with LoadSimulatedRequest() (iOS 15+ / MacCatalyst 15+). This method loads the HTML content while creating a proper WKWebView back/forward history entry, enabling GoBack()/GoForward() to work correctly. For iOS 13/14 and earlier MacCatalyst, the implementation falls back to LoadHtmlString() to preserve compatibility.
Issues Fixed
Fixes #30381
Tested the behavior in the following platforms.
Before.mov
After.mov