cocos_click_preview
Simulate mouse clicks at specific coordinates in a running Cocos Creator preview to test UI interactions like buttons and menus, with configurable timing and button options.
Instructions
Click at page coordinates (x, y) in a running preview.
Use this to drive UI you just built — a "Start" button, a menu
tab, a card. Coordinates are in PAGE space (top-left origin),
NOT viewport-relative. button is 'left' / 'right' / 'middle'.
wait_ms gives post-click animations/scene-changes time to
settle before the tool returns.
Requires the optional playwright dependency (same as
cocos_screenshot_preview). Returns {ok: True} on success,
raises on navigation/launch failure with an actionable hint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| x | Yes | ||
| y | Yes | ||
| button | No | left | |
| wait_ms | No | ||
| viewport_width | No | ||
| viewport_height | No | ||
| timeout_ms | No |