NetworkThrottling

Playwright\Network\NetworkThrottling

Network throttling presets and configuration.

Methods

__construct()

function __construct( public int $downloadThroughput, public int $uploadThroughput, public int $latency, )

none()

self

No throttling (default).

function none(): self

slow3G()

self

Slow 3G connection.

function slow3G(): self

fast3G()

self

Fast 3G connection.

function fast3G(): self

fast4G()

self

4G connection.

function fast4G(): self

dsl()

self

DSL connection.

function dsl(): self

wifi()

self

WiFi connection.

function wifi(): self

custom()

self

Create custom throttling configuration.

function custom(int $downloadThroughput, int $uploadThroughput, int $latency): self

toArray()

array

Convert to array for transport.

function toArray(): array

isDisabled()

bool

Check if throttling is disabled.

function isDisabled(): bool

getDescription()

string

Get human-readable description.

function getDescription(): string