Gesture.PressAndHold Method (UITestControl, Point, Int32)
Perform a press and hold gesture which is mainly associated with activating a tooltip or a context menu.
Namespace: Microsoft.VisualStudio.TestTools.UITesting
Assembly: Microsoft.VisualStudio.TestTools.WindowsStore.UITesting (in Microsoft.VisualStudio.TestTools.WindowsStore.UITesting.dll)
Syntax
'Declaration
Public Shared Sub PressAndHold ( _
control As UITestControl, _
relativeCoordinates As Point, _
durationInMilliseconds As Integer _
)
public static void PressAndHold(
UITestControl control,
Point relativeCoordinates,
int durationInMilliseconds
)
public:
static void PressAndHold(
UITestControl^ control,
Point relativeCoordinates,
int durationInMilliseconds
)
static member PressAndHold :
control:UITestControl *
relativeCoordinates:Point *
durationInMilliseconds:int -> unit
public static function PressAndHold(
control : UITestControl,
relativeCoordinates : Point,
durationInMilliseconds : int
)
Parameters
control
Type: Microsoft.VisualStudio.TestTools.UITesting.UITestControlControl on which the press and hold gesture is to be performed.
- relativeCoordinates
Type: Microsoft.VisualStudio.TestTools.UITest.Input.Point
durationInMilliseconds
Type: Int32The duration to hold in milliseconds.
Remarks
Playback of a press and hold 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.