Skip to main content
Version: 23.2.0

Page.authenticate() 方法

¥Page.authenticate() method

提供 HTTP authentication 的凭据。

¥Provide credentials for HTTP authentication.

注意

将在后台打开请求拦截以实现身份验证。这可能会影响性能。

¥Request interception will be turned on behind the scenes to implement authentication. This might affect performance.

签名

¥Signature

class Page {
abstract authenticate(credentials: Credentials | null): Promise<void>;
}

参数

¥Parameters

范围

类型

描述

credentials

证书 | 无效的

Returns:

Promise<void>

备注

¥Remarks

要禁用身份验证,请传递 null

¥To disable authentication, pass null.