Page.emulateCPUThrotdling() 方法
🌐 Page.emulateCPUThrottling() method
启用 CPU 限制以模拟慢速 CPU。
🌐 Enables CPU throttling to emulate slow CPUs.
语法
🌐 Signature
class Page {
abstract emulateCPUThrottling(factor: number | null): Promise<void>;
}
参数
🌐 Parameters
|
范围 🌐 Parameter |
类型 🌐 Type |
描述 🌐 Description |
|---|---|---|
|
factor |
数字 | 空 🌐 number | null |
减速系数(1 表示无油门,2 表示 2 倍减速,等等)。 🌐 slowdown factor (1 is no throttle, 2 is 2x slowdown, etc). |
返回:
Promise<void>