예제 #1
0
        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);
        }
예제 #2
0
 /// <summary>
 ///     Performs the action.
 /// </summary>
 public async Task Perform(CancellationToken cancellationToken = new CancellationToken())
 {
     await TouchScreen.Up(x, y, cancellationToken);
 }
예제 #3
0
 /// <summary>
 ///     Performs the action.
 /// </summary>
 public async Task Perform(CancellationToken cancellationToken = new CancellationToken())
 {
     await TouchScreen.Up(x, y, cancellationToken).ConfigureAwait(false);
 }