diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue12685.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue12685.cs
index db95bb05f706..b1436c4b8cd6 100644
--- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue12685.cs
+++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue12685.cs
@@ -21,12 +21,8 @@ public void ShapesPathReceiveGestureRecognizers()
{
var testLabel = App.WaitForFirstElement(StatusLabelId);
Assert.That(testLabel.ReadText(), Is.EqualTo(ResetStatus));
- var labelRect = App.WaitForFirstElement(StatusLabelId).GetRect(); // Path element not able get via automationid so getting the rect of the label calculated points to tap on the path
-#if MACCATALYST // TapCoordinates is not working on MacCatalyst Issue: https://github.com/dotnet/maui/issues/19754
- App.ClickCoordinates(labelRect.X + 3, labelRect.Y - 10);
-#else
+ var labelRect = App.WaitForFirstElement(StatusLabelId).GetRect(); // Path element not able get via AutomationId so getting the rect of the label calculated points to tap on the path
App.TapCoordinates(labelRect.X + 3, labelRect.Y - 10);
-#endif
App.WaitForElement(StatusLabelId);
Assert.That(testLabel.ReadText(), Is.EqualTo(ClickedStatus));
}
diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue2894.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue2894.cs
index 34ab32df38e7..8fffc594c036 100644
--- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue2894.cs
+++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue2894.cs
@@ -44,11 +44,7 @@ public void VariousSpanGesturePermutation()
void PerformGestureAction(float x, float y)
{
-#if MACCATALYST // TapCoordinates is not working on MacCatalyst Issue: https://github.com/dotnet/maui/issues/19754
- App.ClickCoordinates(x, y);
-#else
App.TapCoordinates(x, y);
-#endif
}
void PerformGestureActionForFirstSpan(Rectangle target)
diff --git a/src/TestUtils/src/UITest.Appium/HelperExtensions.cs b/src/TestUtils/src/UITest.Appium/HelperExtensions.cs
index 3dbf018c8660..f1dda4baecad 100644
--- a/src/TestUtils/src/UITest.Appium/HelperExtensions.cs
+++ b/src/TestUtils/src/UITest.Appium/HelperExtensions.cs
@@ -16,8 +16,6 @@ public static class HelperExtensions
///
/// For desktop, this will perform a mouse click on the target element.
/// For mobile, this will tap the element.
- /// This API works for all platforms whereas TapCoordinates currently doesn't work on Catalyst
- /// https://github.com/dotnet/maui/issues/19754
///
/// Represents the main gateway to interact with an app.
/// Target Element.
@@ -29,8 +27,6 @@ public static void Tap(this IApp app, string element)
///
/// For desktop, this will perform a mouse click on the target element.
/// For mobile, this will tap the element.
- /// This API works for all platforms whereas TapCoordinates currently doesn't work on Catalyst
- /// https://github.com/dotnet/maui/issues/19754
///
/// Represents the main gateway to interact with an app.
/// Represents the query that identify an element by parameters such as type, text it contains or identifier.
@@ -308,8 +304,6 @@ public static void Click(this IUIElement element)
///
/// For desktop, this will perform a mouse click on the target element.
/// For mobile, this will tap the element.
- /// This API works for all platforms whereas TapCoordinates currently doesn't work on Catalyst
- /// https://github.com/dotnet/maui/issues/19754
///
/// Target Element.
public static void Tap(this IUIElement element)
@@ -409,11 +403,18 @@ internal static void DoubleTap(this IApp app, IUIElement? element)
/// The y coordinate to double tap.
public static void DoubleTapCoordinates(this IApp app, float x, float y)
{
- app.CommandExecutor.Execute("doubleTapCoordinates", new Dictionary
+ if (app is AppiumCatalystApp)
{
- { "x", x },
- { "y", y }
- });
+ app.DoubleClickCoordinates(x, y); // Directly invoke coordinate-based double click for AppiumCatalystApp.
+ }
+ else
+ {
+ app.CommandExecutor.Execute("doubleTapCoordinates", new Dictionary
+ {
+ { "x", x },
+ { "y", y }
+ });
+ }
}
///
@@ -1422,11 +1423,18 @@ public static void ClickCoordinates(this IApp app, float x, float y)
/// The y coordinate to tap.
public static void TapCoordinates(this IApp app, float x, float y)
{
- app.CommandExecutor.Execute("tapCoordinates", new Dictionary
+ if (app is AppiumCatalystApp)
{
- { "x", x },
- { "y", y }
- });
+ app.ClickCoordinates(x, y); // // Directly invoke coordinate-based click for AppiumCatalystApp.
+ }
+ else
+ {
+ app.CommandExecutor.Execute("tapCoordinates", new Dictionary
+ {
+ { "x", x },
+ { "y", y }
+ });
+ }
}
///