simulate-mouse-event
The simulate-mouse-event
snippet triggers arbitrary mouse events on elements matched by a CSS or XPath selector by calling dispatchEvent
for a selector.
The following table lists MouseEvent and PointerEvent events for this snippet:
MouseEvents | PointerEvents |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parameters
eyeo uses a custom, optional parameter syntax similar to the syntax used in specificClicker
.
Mandatory parameter
Name | Description | Mandatory |
---|---|---|
| The CSS/XPath selector that an HTML element must match for the event to be triggered. A maximum of seven (7) selectors are supported. | Yes |
Optional parameters
Optional parameters are added to the selectors with a $
sign. You can combine multiple parameters for a single selector by separating them with a comma. If you don't specify a parameter is, the default value will be assumed for that selector.
Name | Description | Default | Mandatory |
---|---|---|---|
| If this flag is not set, only the chosen event for the last selector will be triggered. The |
| No |
| This determines how much time the snippet should wait before simulating the event. Default is 500 ms. If you don't want a delay, you must explicitly state | 500 | No |
| If set, the event will be triggered after each delay period ends. For example, if the selected event is |
| No |
| Determines which event should be simulated for the selector. |
| No |
Filter examples
The following table lists examples that use the simulate-mouse-event
snippet:
Filter | Result |
---|---|
| Simulates a click event for the elements that match the selector after 500 ms. |
| Simulates a click event for |
| Simulates a click event for both of the selectors if both of them are present in the page. The |
| Simulates a click event for the elements that are matched with the |
| Simulates a click event every 100 ms. |
| Simulates a |
Last updated