Skip to main content
Version: 23.8.0

Page.setCookie() 方法

¥Page.setCookie() method

签名

¥Signature

class Page {
abstract setCookie(...cookies: CookieParam[]): Promise<void>;
}

参数

¥Parameters

范围

类型

描述

cookies

CookieParam[]

Returns:

Promise<void>

示例

¥Example

await page.setCookie(cookieObject1, cookieObject2);