Locator.setWaitForEnabled() 方法
通过克隆当前定位器并指定在执行操作前是否等待输入元素变为可用,来创建一个新的定位器实例。适用于 click 和 fill 操作。
签名
class Locator {
setWaitForEnabled<NodeType extends Node>(
this: Locator<NodeType>,
value: boolean,
): Locator<NodeType>;
}
参数
|
参数 |
类型 |
说明 |
|---|---|---|
|
this |
Locator<NodeType> | |
|
value |
boolean |
返回值:
Locator<NodeType>
默认值:
true