Table of Contents

Method SimulateClick

Namespace
DotNetBrowser.Input.Mouse
Assembly
DotNetBrowser.Core.dll

SimulateClick(IMouse, MouseButton, Point)

Simulate mouse button click at the specified location.

public static void SimulateClick(this IMouse mouse, MouseButton mouseButton, Point location)

Parameters

mouse IMouse

The mouse input simulation service.

mouseButton MouseButton

The mouse button that should be used for clicking.

location Point

The mouse pointer location relative to the top left corner of the browser.

Remarks

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

SimulateClick(IMouse, MouseButton, IElement)

Simulate mouse button click at the specified element.

public static void SimulateClick(this IMouse mouse, MouseButton mouseButton, IElement element)

Parameters

mouse IMouse

The mouse input simulation service.

mouseButton MouseButton

The mouse button that should be used for clicking.

element IElement

The element to click at.

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.