ElementHandle.isHidden() 方法
¥ElementHandle.isHidden() method
如果以下至少一项为真,则认为元素是隐藏的:
¥An element is considered to be hidden if at least one of the following is true:
-
元素没有 计算样式。
¥the element has no computed styles.
-
元素具有空 边界客户端矩形。
¥the element has an empty bounding client rect.
-
元素的 visibility 是
hidden
或collapse
。¥the element's visibility is
hidden
orcollapse
.
签名
¥Signature
class ElementHandle {
isHidden(): Promise<boolean>;
}
Returns:
Promise<boolean>