Page.emulateLocale() 方法
🌐 Page.emulateLocale() method
语法
🌐 Signature
class Page {
abstract emulateLocale(locale?: string): Promise<void>;
}
参数
🌐 Parameters
范围 🌐 Parameter | 类型 🌐 Type | 描述 🌐 Description |
|---|---|---|
locale | string | (可选) 要在页面上模拟的语言环境。不传递语言环境将禁用语言环境模拟。 🌐 (Optional) Locale to emulate on the page. Passing no locale disables locale emulation. |
返回:
Promise<void>