Skip to main content
Version: 23.5.0

Frame.hover() 方法

¥Frame.hover() method

将指针悬停在与 selector 匹配的第一个元素的中心上。

¥Hovers the pointer over the center of the first element that matches the selector.

签名

¥Signature

class Frame {
hover(selector: string): Promise<void>;
}

参数

¥Parameters

范围

类型

描述

selector

string

要查询的选择器。

Returns:

Promise<void>

异常

¥Exceptions

如果没有元素匹配 selector,则抛出异常。

¥Throws if there's no element matching selector.