Skip to main content
Version: 24.38.0

Locator.setWaitForEnabled() 方法

🌐 Locator.setWaitForEnabled() method

通过克隆当前定位器并指定在执行操作前是否等待输入元素可用来创建一个新的定位器实例。适用于 clickfill 操作。

🌐 Creates a new locator instance by cloning the current locator and specifying whether to wait for input elements to become enabled before the action. Applicable to click and fill actions.

语法

🌐 Signature

class Locator {
setWaitForEnabled<NodeType extends Node>(
this: Locator<NodeType>,
value: boolean,
): Locator<NodeType>;
}

参数

🌐 Parameters

范围

🌐 Parameter

类型

🌐 Type

描述

🌐 Description

this

Locator<NodeType>

value

boolean

返回:

Locator<NodeType>

默认值:

🌐 Default value:

true