NetworkThrottling
Playwright\Network\NetworkThrottling
Network throttling presets and configuration.
Methods
__construct()
function __construct( public int $downloadThroughput, public int $uploadThroughput, public int $latency, )
none()
selfNo throttling (default).
function none(): self
slow3G()
selfSlow 3G connection.
function slow3G(): self
fast3G()
selfFast 3G connection.
function fast3G(): self
fast4G()
self4G connection.
function fast4G(): self
dsl()
selfDSL connection.
function dsl(): self
wifi()
selfWiFi connection.
function wifi(): self
custom()
selfCreate custom throttling configuration.
function custom(int $downloadThroughput, int $uploadThroughput, int $latency): self
toArray()
arrayConvert to array for transport.
function toArray(): array
isDisabled()
boolCheck if throttling is disabled.
function isDisabled(): bool
getDescription()
stringGet human-readable description.
function getDescription(): string