public void Slide() { var touchable = AppSession.FindElementByAccessibilityId("Touchable"); var startCoords = touchable.Coordinates.LocationInViewport; var endX = startCoords.X + TouchDistance.Long; var endY = startCoords.Y + TouchDistance.Long; TouchScreen.Down(startCoords.X, startCoords.Y); TouchScreen.Up(endX, endY); var endCoords = touchable.Coordinates.LocationInViewport; Assert.IsTrue(endCoords.X > startCoords.X); Assert.IsTrue(endCoords.Y > startCoords.Y); }
/// <summary> /// Performs the action. /// </summary> public async Task Perform(CancellationToken cancellationToken = new CancellationToken()) { await TouchScreen.Up(x, y, cancellationToken); }
/// <summary> /// Performs the action. /// </summary> public async Task Perform(CancellationToken cancellationToken = new CancellationToken()) { await TouchScreen.Up(x, y, cancellationToken).ConfigureAwait(false); }