Click or drag to resize

InputDispatchMouseEventAsync Method

Version 85.3.121
Dispatches a mouse event to the page.

Namespace:  CefSharp.DevTools.Input
Assembly:  CefSharp (in CefSharp.dll) Version: 85.3.121.0 (85.3.121.0)
Syntax
public Task<DevToolsMethodResponse> DispatchMouseEventAsync(
	string type,
	long x,
	long y,
	Nullable<int> modifiers = null,
	Nullable<long> timestamp = null,
	Nullable<MouseButton> button = null,
	Nullable<int> buttons = null,
	Nullable<int> clickCount = null,
	Nullable<long> deltaX = null,
	Nullable<long> deltaY = null,
	string pointerType = null
)

Parameters

type
Type: SystemString
Type of the mouse event.
x
Type: SystemInt64
X coordinate of the event relative to the main frame's viewport in CSS pixels.
y
Type: SystemInt64
Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers tothe top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
modifiers (Optional)
Type: SystemNullableInt32
Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8(default: 0).
timestamp (Optional)
Type: SystemNullableInt64
Time at which the event occurred.
button (Optional)
Type: SystemNullableMouseButton
Mouse button (default: "none").
buttons (Optional)
Type: SystemNullableInt32
A number indicating which buttons are pressed on the mouse when a mouse event is triggered.Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0.
clickCount (Optional)
Type: SystemNullableInt32
Number of times the mouse button was clicked (default: 0).
deltaX (Optional)
Type: SystemNullableInt64
X delta in CSS pixels for mouse wheel event (default: 0).
deltaY (Optional)
Type: SystemNullableInt64
Y delta in CSS pixels for mouse wheel event (default: 0).
pointerType (Optional)
Type: SystemString
Pointer type (default: "mouse").

Return Value

Type: TaskDevToolsMethodResponse
returns System.Threading.Tasks.Task<DevToolsMethodResponse>
See Also