ElementHandle.touchMove() 方法
🌐 ElementHandle.touchMove() method
此方法在需要时将元素滚动到视图中,然后将触摸移动到元素的中心。
🌐 This method scrolls the element into view if needed, and then moves the touch to the center of the element.
语法
🌐 Signature
class ElementHandle {
touchMove(this: ElementHandle<Element>, touch?: TouchHandle): Promise<void>;
}
参数
🌐 Parameters
范围 🌐 Parameter | 类型 🌐 Type | 描述 🌐 Description |
|---|---|---|
this | ElementHandle<Element> | |
touch | (可选) 一个可选的 TouchHandle。如果提供,将移动此触摸。如果未提供,将移动第一个活动触摸。 🌐 (Optional) An optional TouchHandle. If provided, this touch will be moved. If not provided, the first active touch will be moved. |
返回:
Promise<void>