simulate-mouse-eventsnippet triggers arbitrary mouse events on elements matched by a CSS or XPath selector by calling
dispatchEventfor a selector.
The following table lists MouseEvent and PointerEvent events for this snippet:
eyeo uses a custom, optional parameter syntax similar to the syntax used in
The CSS/XPath selector that an HTML element must match for the event to be triggered. A maximum of seven (7) selectors are supported.
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.
If this flag is not set, only the chosen event for the last selector will be triggered.
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
If set, the event will be triggered after each delay period ends.
For example, if the selected event is
Determines which event should be simulated for the selector.
The following table lists examples that use the
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.