Skip to main content
Version: 23.8.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

范围

类型

描述

this

定位器<节点类型>

value

boolean

Returns:

Locator<NodeType>

默认值:

¥Default value:

true