element_touch
Dispatches low-level touch events (touchstart, touchmove, touchend) to an element for custom multi-touch, long press, or segmented gestures. Use for advanced touch interactions not covered by simpler tap or swipe tools.
Instructions
对元素派发底层触摸事件(touchstart/touchmove/touchend)。多数场景不需要它:简单点击用 element_tap,滑动/拖拽用 element_swipe;只有需要自定义多点/长按/分段手势时才用本工具。phase:'start'/'move'/'end' 是单个事件,需自己跨多次调用拼成完整手势;'sequence' 在一次调用内完成 touchstart→moves→touchend(推荐)。x/y 可选,相对元素左上角的像素坐标,默认取元素中心。moves[] 仅在 'sequence' 下使用,是中间移动点序列(每点可带 delayMs)。holdMs:touchstart 后按住的毫秒数(长按)。identifier:触摸点 id(多指时区分,默认 1)。waitMs:整个手势后额外等待毫秒。innerSelector:定位自定义组件内部元素(selector 定位组件)。selector 支持 [index=N](仅作用于 selector)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| moves | No | ||
| phase | Yes | ||
| holdMs | No | ||
| waitMs | No | ||
| selector | Yes | ||
| connection | No | 可选连接覆盖(不传则用默认会话)。可用字段:mode(launch|connect)、cliPath、projectPath、wsEndpoint、timeout、port(【自动化端口】→ cli auto --auto-port,默认 9420;不是 IDE HTTP 服务端口,别把 IDE 服务端口传进来)、account、ticket、trustProject、args、cwd、autoClose、autoLaunch、launchTimeout、connectTimeout。 | |
| identifier | No | ||
| innerSelector | No |