Click or drag to resize

MouseExtensionsSimulateClick Method (IMouse, MouseButton, IElement)

Simulate mouse button click at the specified element.

Namespace:  DotNetBrowser.Input.Mouse
Assembly:  DotNetBrowser.Core (in DotNetBrowser.Core.dll) Version: 2.23.2
Syntax
C#
public static void SimulateClick(
	this IMouse mouse,
	MouseButton mouseButton,
	IElement element
)

Parameters

mouse
Type: DotNetBrowser.Input.MouseIMouse
The mouse input simulation service.
mouseButton
Type: DotNetBrowser.Input.Mouse.EventsMouseButton
The mouse button that should be used for clicking.
element
Type: DotNetBrowser.DomIElement
The element to click at.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IMouse. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks

The mouse click is simulated by raising Moved, Pressed, and Released events in a sequence.

The point to click at is determined as the center of the bounding client rectangle of the specified element.

See Also