Download the PHP package playwright-php/devices without Composer
On this page you can find all versions of the php package playwright-php/devices. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download playwright-php/devices
More information about playwright-php/devices
Files in playwright-php/devices
Package devices
Short Description Playwright device descriptors in PHP (mobile & desktop screens, user agents, viewports, scale factors, touch/mobile flags).
License MIT
Informations about the package devices


[](https://packagist.org/packages/playwright-php/devices)

Playwright PHP Devices
Use Microsoft Playwright's device descriptors from PHP for repeatable viewport, user agent, touch, and mobile emulation.
Installation
The package requires PHP 8.2+. Install playwright-php/playwright as well when using descriptors in browser automation.
Quick Start
Load a descriptor by its upstream Playwright device name:
Use its properties when creating a Playwright browser context:
The descriptor exposes its preferred browser engine through getDefaultBrowserType(). Choose the matching Playwright engine when browser-specific behavior matters.
Orientation
Descriptors that provide a landscape viewport can be changed without mutating the original object:
Calling landscape() on a descriptor without landscape data throws an InvalidArgumentException.
Catalog
Use DeviceRegistry::has() to check a name and DeviceRegistry::all() to retrieve the complete catalog.
The generated device catalog lists every available descriptor and its browser, screen, viewport, scale, mobile, and touch values.
Device descriptors emulate browser-visible properties. They do not reproduce physical hardware, operating-system UI, network conditions, or device performance.
Documentation
- Device catalog
- Playwright PHP Getting Started
Contributing
Contributions are welcome. Before submitting a pull request, run:
License
Playwright PHP Devices is released under the MIT License.