Skip to main content
Version: 24.38.0

Page.waitForNetworkIdle() 方法

🌐 Page.waitForNetworkIdle() method

等待网络空闲。

🌐 Waits for the network to be idle.

语法

🌐 Signature

class Page {
waitForNetworkIdle(options?: WaitForNetworkIdleOptions): Promise<void>;
}

参数

🌐 Parameters

范围

🌐 Parameter

类型

🌐 Type

描述

🌐 Description

options

等待网络空闲选项

(可选) 配置等待行为的选项。

🌐 (Optional) Options to configure waiting behavior.

返回:

Promise<void>

一旦网络空闲就会解决的 promise。

🌐 A promise which resolves once the network is idle.

附注

🌐 Remarks

该函数将始终至少等待设定的 IdleTime

🌐 The function will always wait at least the set IdleTime.