summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core.UITests.Shared
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@gmail.com>2017-06-15 21:26:58 (GMT)
committerE.Z. Hart <hartez@gmail.com>2017-06-15 21:26:58 (GMT)
commit7615340cfd351e150ed9655f86ef3766df041aa1 (patch)
treebb632ac8221625dee5f1fbcab0d8077e84e97321 /Xamarin.Forms.Core.UITests.Shared
parent6f5d6ce8daf280ce3f5717cb90ee2e73ae9e474b (diff)
downloadxamarin-forms-7615340cfd351e150ed9655f86ef3766df041aa1.zip
xamarin-forms-7615340cfd351e150ed9655f86ef3766df041aa1.tar.gz
xamarin-forms-7615340cfd351e150ed9655f86ef3766df041aa1.tar.bz2
Fix test for 57317 on iOS
Diffstat (limited to 'Xamarin.Forms.Core.UITests.Shared')
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Utilities/Gestures.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core.UITests.Shared/Utilities/Gestures.cs b/Xamarin.Forms.Core.UITests.Shared/Utilities/Gestures.cs
index f998267..660d2ea 100644
--- a/Xamarin.Forms.Core.UITests.Shared/Utilities/Gestures.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Utilities/Gestures.cs
@@ -105,5 +105,22 @@ namespace Xamarin.Forms.Core.UITests
{
app.DragCoordinates (drag.XStart, drag.YStart, drag.XEnd, drag.YEnd);
}
+
+ public static void ActivateContextMenu(this IApp app, string target)
+ {
+#if __IOS__
+ var element = app.WaitForElement(target);
+ var rect = element[0].Rect;
+ var appRect = app.RootViewRect();
+
+ app.DragCoordinates(rect.X + (0.85f * appRect.Width),
+ rect.CenterY,
+ rect.X + (0.25f * rect.Width),
+ rect.CenterY);
+#else
+ app.TouchAndHold(target);
+#endif
+
+ }
}
} \ No newline at end of file