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
范围 | 类型 | 描述 |
---|---|---|
options | (可选的)导航参数 |
Returns:
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.