Page.authenticate() 方法
🌐 Page.authenticate() method
提供 HTTP authentication 的凭据。
🌐 Provide credentials for HTTP authentication.
note
请求拦截将在后台开启以实现身份验证。这可能会影响性能。
🌐 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
|
范围 🌐 Parameter |
类型 🌐 Type |
描述 🌐 Description |
|---|---|---|
|
credentials |
凭证 | null |
返回:
Promise<void>
附注
🌐 Remarks
要禁用身份验证,请传递 null。
🌐 To disable authentication, pass null.