Page.goBack() 方法
¥Page.goBack() method
此方法导航到历史记录中的上一页。
¥This method navigate to the previous page in history.
签名
¥Signature
class Page {
abstract goBack(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 can not go back, resolves to null
.