diff --git a/testing/TestHarness/TestHarness.UITest/Ext/Navigation/Dialogs/Given_ContentDialog.cs b/testing/TestHarness/TestHarness.UITest/Ext/Navigation/Dialogs/Given_ContentDialog.cs index 319ae6153f..c5fb8e91d9 100644 --- a/testing/TestHarness/TestHarness.UITest/Ext/Navigation/Dialogs/Given_ContentDialog.cs +++ b/testing/TestHarness/TestHarness.UITest/Ext/Navigation/Dialogs/Given_ContentDialog.cs @@ -90,7 +90,11 @@ public async Task When_ComplexContentDialogNavigateSecondPage() App.WaitElement("DialogsContentDialogsSecondPageNavigationBar"); - App.Tap("DialogsContentDialogsSecondPageBackButton"); + PlatformHelpers.On( + iOS: () => App.FastTap("BackButton"), + Android: () => App.FastTap(q => q.Marked("DialogsContentDialogsSecondPageNavigationBar").Descendant("AppCompatImageButton")), + Browser: () => App.Tap("DialogsContentDialogsSecondPageBackButton") + ); await Task.Delay(AppExtensions.UIWaitTimeInMilliseconds); diff --git a/testing/TestHarness/TestHarness/App.xaml.cs b/testing/TestHarness/TestHarness/App.xaml.cs index 02c849f908..6129b1709f 100644 --- a/testing/TestHarness/TestHarness/App.xaml.cs +++ b/testing/TestHarness/TestHarness/App.xaml.cs @@ -1,4 +1,5 @@ using Uno.Extensions.Diagnostics; +using Windows.Graphics.Display; namespace TestHarness; public partial class App : Application @@ -67,4 +68,7 @@ protected override async void OnLaunched(LaunchActivatedEventArgs args) } _window.Activate(); } +#if USE_UITESTS + public static string GetDisplayScreenScaling(string value) => (DisplayInformation.GetForCurrentView().LogicalDpi * 100f / 96f).ToString(CultureInfo.InvariantCulture); +#endif } diff --git a/testing/TestHarness/TestHarness/Ext/Navigation/Dialogs/ContentDialogsSecondPage.xaml b/testing/TestHarness/TestHarness/Ext/Navigation/Dialogs/ContentDialogsSecondPage.xaml index 9c77a21392..e77b3ed1b4 100644 --- a/testing/TestHarness/TestHarness/Ext/Navigation/Dialogs/ContentDialogsSecondPage.xaml +++ b/testing/TestHarness/TestHarness/Ext/Navigation/Dialogs/ContentDialogsSecondPage.xaml @@ -14,21 +14,18 @@ - + - + - - - + diff --git a/testing/TestHarness/TestHarness/Platforms/Android/MainActivity.Android.cs b/testing/TestHarness/TestHarness/Platforms/Android/MainActivity.Android.cs index bf983cd57d..1f449c181e 100644 --- a/testing/TestHarness/TestHarness/Platforms/Android/MainActivity.Android.cs +++ b/testing/TestHarness/TestHarness/Platforms/Android/MainActivity.Android.cs @@ -3,6 +3,7 @@ using Android.OS; using Android.Views; using Android.Widget; +using Java.Interop; namespace TestHarness.Droid; [Activity( @@ -12,4 +13,6 @@ namespace TestHarness.Droid; )] public class MainActivity : Microsoft.UI.Xaml.ApplicationActivity { + [Export("GetDisplayScreenScaling")] + public string GetDisplayScreenScaling(string value) => App.GetDisplayScreenScaling(value); }