simulate-mouse-event
The simulate-mouse-event snippet triggers arbitrary mouse events on elements matched by a CSS or XPath selector by calling dispatchEvent.
Supported events
|
MouseEvents |
PointerEvents |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parameters
Mandatory
|
Name |
Description |
Mandatory |
|---|---|---|
|
|
The CSS/XPath selector. Maximum of 7 selectors supported. |
Yes |
Optional (added with $ sign, combined with ,)
|
Name |
Description |
Default |
|---|---|---|
|
|
If not set, only the last selector triggers the event. |
false |
|
|
Time in ms to wait before simulating. Use |
500 |
|
|
If set, the event triggers repeatedly after each delay period. |
false |
|
|
Determines which event to simulate. |
click |
Filter examples
|
Filter |
Result |
|---|---|
|
|
Simulates a click after 500ms. |
|
|
Clicks |
|
|
Clicks both selectors if both are present. |
|
|
Clicks the XPath matched element with no delay. |
|
|
Clicks every 100ms. |
|
|
Simulates |