element_scrollTo
Scroll a scroll-view component to an absolute pixel position (x, y). Use selector for the scroll-view and innerSelector for nested elements. Only works with scroll-view; use element_swipe for other elements.
Instructions
将 scroll-view 组件滚动到指定绝对偏移(element.scrollTo(x,y))。仅对 scroll-view 组件有效,其它元素会失败;非 scroll-view 的滚动用手势 element_swipe。x/y 为目标 scrollLeft/scrollTop 像素值(绝对位置,非增量)。要定位自定义组件内部的 scroll-view,用 selector 定位组件、innerSelector 定位内部元素。selector 支持 [index=N](仅作用于 selector)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | 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。 | |
| innerSelector | No |