Gesture.Swipe Method (UITestControl, UITestGestureDirection, Int32)
Perform a swipe gesture which is a quick slide of a finger for a short distance. For example, swipe across an email in your inbox to select it or swipe down on a tile to select it.
Namespace: Microsoft.VisualStudio.TestTools.UITesting
Assembly: Microsoft.VisualStudio.TestTools.WindowsStore.UITesting (in Microsoft.VisualStudio.TestTools.WindowsStore.UITesting.dll)
Syntax
'Declaration
Public Shared Sub Swipe ( _
control As UITestControl, _
swipeDirection As UITestGestureDirection, _
swipeLength As Integer _
)
public static void Swipe(
UITestControl control,
UITestGestureDirection swipeDirection,
int swipeLength
)
public:
static void Swipe(
UITestControl^ control,
UITestGestureDirection swipeDirection,
int swipeLength
)
static member Swipe :
control:UITestControl *
swipeDirection:UITestGestureDirection *
swipeLength:int -> unit
public static function Swipe(
control : UITestControl,
swipeDirection : UITestGestureDirection,
swipeLength : int
)
Parameters
control
Type: Microsoft.VisualStudio.TestTools.UITesting.UITestControlControl on which the swipe gesture is to be performed.
swipeDirection
Type: Microsoft.VisualStudio.TestTools.UITesting.UITestGestureDirectionThe direction of the swipe gesture (Up/Down/Left/Right).
swipeLength
Type: Int32The length to swipe in pixels.
Remarks
Playback of a swipe gesture depends on screen resolution. If the resolution changes, the parameters may have to be changed.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.