Skip to main content
Version: 23.5.0

Page.cookies() 方法

¥Page.cookies() method

如果未指定 URL,则此方法返回当前页面 URL 的 cookie。如果指定了 URL,则仅返回这些 URL 的 cookie。

¥If no URLs are specified, this method returns cookies for the current page URL. If URLs are specified, only cookies for those URLs are returned.

签名

¥Signature

class Page {
abstract cookies(...urls: string[]): Promise<Cookie[]>;
}

参数

¥Parameters

范围

类型

描述

urls

string[]

Returns:

Promise<Cookie[]>