Gesture.Swipe Method (UITestControl, Double, 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, _
directionInDegrees As Double, _
swipeLength As Integer _
)
public static void Swipe(
UITestControl control,
double directionInDegrees,
int swipeLength
)
public:
static void Swipe(
UITestControl^ control,
double directionInDegrees,
int swipeLength
)
static member Swipe :
control:UITestControl *
directionInDegrees:float *
swipeLength:int -> unit
public static function Swipe(
control : UITestControl,
directionInDegrees : double,
swipeLength : int
)
Parameters
control
Type: Microsoft.VisualStudio.TestTools.UITesting.UITestControlControl on which the swipe gesture is to be performed.
directionInDegrees
Type: DoubleThe direction of the swipe gesture in degrees. Value lies between [0,360].
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.