From 25cd0bee4a4e9755613c8bdca9618f53644a4c12 Mon Sep 17 00:00:00 2001 From: NanthiniMahalingam <105482474+NanthiniMahalingam@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:14:36 +0530 Subject: [PATCH] Resolved the webview loaded without exception failed case in android platform. --- .../tests/TestCases.HostApp/Issues/Issue18452.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue18452.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue18452.cs index 9317f1535f9b..676e7fdd6a44 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Issue18452.cs +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue18452.cs @@ -43,9 +43,12 @@ protected override void Init() { if (c.Name == "DotNetMAUICookie") { - grid.Children.Add(label); - label.Text = "Success"; - break; + if (!grid.Contains(label)) + { + grid.Children.Add(label); + label.Text = "Success"; + break; + } } } }; @@ -53,4 +56,4 @@ protected override void Init() Content = grid; } } -} \ No newline at end of file +}