Mouse Class
Provides static methods for performing mouse actions in a user interface (UI) test.
Inheritance Hierarchy
Object
Microsoft.VisualStudio.TestTools.UITesting.Mouse
Namespace: Microsoft.VisualStudio.TestTools.UITesting
Assembly: Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)
Syntax
'Declaration
<CLSCompliantAttribute(True)> _
Public Class Mouse _
Implements IDisposable
[CLSCompliantAttribute(true)]
public class Mouse : IDisposable
[CLSCompliantAttribute(true)]
public ref class Mouse : IDisposable
[<CLSCompliantAttribute(true)>]
type Mouse =
class
interface IDisposable
end
public class Mouse implements IDisposable
The Mouse type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Mouse | Infrastructure. Initializes a new instance of the Mouse class. |
Top
Properties
Name | Description | |
---|---|---|
HoverDuration | Gets or sets the mouse hover duration in milliseconds. | |
Instance | Gets or sets the Mouse instance. | |
Location | Gets or sets the location of the Mouse. | |
LocationImplementation | Gets or sets the current location of the Mouse. | |
MouseDragSpeed | Gets or sets the mouse move speed. | |
MouseMoveSpeed | Gets or sets the mouse move speed. |
Top
Methods
Name | Description | |
---|---|---|
Click() | Clicks the default mouse button. | |
Click(Point) | Clicks the default mouse button at the specified location. | |
Click(MouseButtons) | Clicks the specified mouse button. | |
Click(ModifierKeys) | Clicks the default mouse button while holding the specified modifier keys. | |
Click(UITestControl) | Clicks the default mouse button on the specified control. | |
Click(UITestControl, Point) | Clicks the default mouse button on the specified control at the specified location relative to that control. | |
Click(UITestControl, MouseButtons) | Clicks the specified mouse button on the specified control. | |
Click(UITestControl, ModifierKeys) | Clicks the default mouse button on the specified control while holding the specified modifier keys. | |
Click(MouseButtons, ModifierKeys, Point) | Clicks the specified mouse button while holding the specified modifier keys at the specified location. | |
Click(UITestControl, MouseButtons, ModifierKeys, Point) | Clicks the specified mouse button on the specified control while holding the specified modifier keys at the specified location relative to that control. | |
ClickImplementation | Clicks the specified mouse button on the specified control while holding the specified modifier keys at the specified location that is relative to that control. | |
Dispose() | Releases all resources that are used by the current instance of the Mouse class. | |
Dispose(Boolean) | Cleans up any resources that are used. | |
DoubleClick() | Double-clicks the mouse button. | |
DoubleClick(Point) | Double-clicks the default mouse button at the specified location. | |
DoubleClick(MouseButtons) | Double-clicks the specified mouse button. | |
DoubleClick(ModifierKeys) | Double-clicks the default mouse button that has modifiers. | |
DoubleClick(UITestControl) | Double-clicks the default mouse button on the specified control. | |
DoubleClick(UITestControl, Point) | Double-clicks the default mouse button on the specified control at the specified location that is relative to the control. | |
DoubleClick(UITestControl, MouseButtons) | Double-clicks the specified mouse button on the specified control. | |
DoubleClick(UITestControl, ModifierKeys) | Double-clicks the default mouse button on the control with modifiers. | |
DoubleClick(MouseButtons, ModifierKeys, Point) | Double-clicks the specified mouse button while holding the specified modifier keys at the specified screen location. | |
DoubleClick(UITestControl, MouseButtons, ModifierKeys, Point) | Double-clicks the specified mouse button on the specified control while holding the specified modifier keys at the specified location that is relative to that control. | |
DoubleClickImplementation | Double-clicks the specified mouse button on the specified control while holding the specified modifier keys at the specified location that is relative to that control. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | The finalizer method. (Overrides Object.Finalize.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Hover(Point) | Moves the mouse to the specified location. | |
Hover(UITestControl) | Pauses the mouse on the specified control. | |
Hover(Point, Int32) | Pause the mouse at the specified point for a specified duration. | |
Hover(UITestControl, Point) | Moves the mouse to the specified location that is relative to the specified control. | |
Hover(UITestControl, Point, Int32) | Pauses the mouse at the specified location that is relative to the specified control for a specified duration. | |
HoverImplementation | Pauses the mouse at the specified location that is relative to the specified control for a specified duration. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Move(Point) | Moves the mouse to the specified location. | |
Move(UITestControl, Point) | Moves the mouse to the specified location that is relative to the specified control. | |
MoveImplementation | Moves the mouse to the specified location that is relative to the specified control. | |
MoveScrollWheel(Int32) | Scrolls the mouse wheel the specified number of times. | |
MoveScrollWheel(Int32, ModifierKeys) | Scrolls the mouse wheel the specified number of times while pressing the specified modifier keys. | |
MoveScrollWheel(UITestControl, Int32) | Scrolls the mouse wheel on the specified control the specified number of times. | |
MoveScrollWheel(UITestControl, Int32, ModifierKeys) | Scrolls the mouse wheel on the specified control the specified number of times while pressing the specified modifier keys. | |
MoveScrollWheelImplementation | Scrolls the mouse wheel on the specified control the specified number of times while pressing the specified modifier keys. | |
StartDragging() | Starts dragging the mouse. | |
StartDragging(UITestControl) | Starts dragging the mouse from the specified control. | |
StartDragging(UITestControl, Point) | Starts dragging the mouse from the specified point that is relative to the specified control or from an absolute control, if control is nulla null reference (Nothing in Visual Basic). | |
StartDragging(UITestControl, MouseButtons) | Starts dragging the mouse while holding down the specified mouse buttons from the specified control. | |
StartDragging(UITestControl, Point, MouseButtons, ModifierKeys) | Starts dragging the mouse while holding down the specified mouse buttons and the specified keys from the specified point that is relative to the specified control or from an absolute control, if control is nulla null reference (Nothing in Visual Basic). | |
StartDraggingImplementation | Starts dragging the mouse while holding down the specified mouse buttons and the specified keys from the specified point relative to the specified control or from an absolute control, if control is nulla null reference (Nothing in Visual Basic). | |
StopDragging(Point) | Stops the drag operation. | |
StopDragging(UITestControl) | Stops the drag operation on the specified control. | |
StopDragging(Int32, Int32) | Stops the drag operation. | |
StopDragging(UITestControl, Point) | Stops the drag operation on the specified control. | |
StopDragging(UITestControl, Int32, Int32) | Stops the drag operation on the specified control. | |
StopDraggingImplementation | Stops the drag operation on the specified control. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.