public static void Stretch(UIObject obj, uint distance, Direction direction, bool pivot) { if (PlatformConfiguration.IsOSVersionLessThan(OSVersion.Redstone5)) { Log.Error("Touch input is not available on OS versions less than RS5, and there is no mouse fallback for stretch. This test should be disabled pre-RS5."); return; } string id = obj.GetIdentifier(); string pivotMode; if (pivot) { pivotMode = "one finger stationary"; } else { pivotMode = "both fingers moving"; } Log.Comment("Stretch with {0} on {1}, in the {2} direction, over a distance of {3} pixels.", pivotMode, id, direction, distance); using (var waiter = GetWaiterForInputEvent(obj, InputEvent.Pinch)) { MultiPointGesture.Stretch(obj, distance, DirectionToAngle(direction), pivot); } Wait.ForIdle(); }
public static void Stretch(UIObject obj) { if (PlatformConfiguration.IsOSVersionLessThan(OSVersion.Redstone5)) { Log.Error("Touch input is not available on OS versions less than RS5, and there is no mouse fallback for stretch. This test should be disabled pre-RS5."); return; } Log.Comment("Stretch on {0}.", obj.GetIdentifier()); using (var waiter = GetWaiterForInputEvent(obj, InputEvent.Pinch)) { MultiPointGesture.Stretch(obj); } Wait.ForIdle(); }