NUnitForms Class Library

MouseController Constructor 

Creates and initialises a new instance of the class for the specified ControlTester.

[Visual Basic]
Overloads Public Sub New( _
   ByVal controlTester As ControlTester _
)
[C#]
public MouseController(
   ControlTester controlTester
);

Parameters

controlTester
A ControlTester.

Remarks

The mouse position is relative to the Control managed by the controlTester.

While the MouseController is active, user keyboard and mouse input is disabled. For this reason the MouseController should be disposed of when the testing is concluded.

Example

            using (MouseController mouse = new MouseControler(myTestControl))
            {
              mouse.Position = new PointF(1,1);
              mouse.Press(MouseButtons.Middle);
            }
            

See Also

MouseController Class | NUnit.Extensions.Forms Namespace