warningUse locator-based locator.dispatchEvent(type, eventInit[, options]) instead.
Dispatches HTML DOM event types e.g. 'click'.
Parameter | Type | Defaults | Description |
---|---|---|---|
selector | string | '' | A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. |
type | string | '' | DOM event type e.g. 'click'. |
eventInit | object | null | Optional event specific properties. See eventInit for more details. |
options | object | null |
eventInit
Since eventInit is event-specific, please refer to the events documentation for the lists of initial properties: