Skip to main content
Version: 24.38.0

Page.goForward() 方法

🌐 Page.goForward() method

此方法导航到历史记录的下一页。

🌐 This method navigate to the next page in history.

语法

🌐 Signature

class Page {
abstract goForward(options?: WaitForOptions): Promise<HTTPResponse | null>;
}

参数

🌐 Parameters

范围

🌐 Parameter

类型

🌐 Type

描述

🌐 Description

options

等待选项

(可选)导航参数

🌐 (Optional) Navigation Parameter

返回:

Promise<HTTPResponse | null>

Promise 会解析为主资源响应。如果有多个重定向,导航将以最后一次重定向的响应解析。如果导航是同一页面,则返回 null。如果未找到历史记录条目,则会抛出异常。

🌐 Promise which resolves to the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. If the navigation is same page, returns null. If no history entry is found throws.