Skip to main content
Version: 22.9.0

LocatorOptions 接口

¥LocatorOptions interface

签名:

¥Signature:

export interface LocatorOptions

属性

¥Properties

属性

修饰符

类型

描述

默认

ensureElementIsInTheViewport

boolean

如果元素尚未在视口中,是否将其滚动到视口中。

true

timeout

数字

整个定位器操作的总超时。

通过 0 禁用超时。

Page.getDefaultTimeout()

visibility

VisibilityOption

是否等待元素为 visiblehiddennull 禁用可见性检查。

waitForEnabled

boolean

是否在操作之前等待输入元素启用。适用于 clickfill 动作。

true

waitForStableBoundingBox

boolean

是否等待两个动画帧之间元素的边界框相同。

true