PHPackages                             fyrts/chrome-devtools-protocol - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fyrts/chrome-devtools-protocol

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fyrts/chrome-devtools-protocol
==============================

Chrome Devtools Protocol client for PHP

v1.2.161(2d ago)214.8k↑69.4%11MITPHPPHP ^7.4|^8.0CI passing

Since Dec 19Pushed 2d agoCompare

[ Source](https://github.com/Fyrts/chrome-devtools-protocol)[ Packagist](https://packagist.org/packages/fyrts/chrome-devtools-protocol)[ RSS](/packages/fyrts-chrome-devtools-protocol/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (72)Versions (471)Used By (1)

Chrome Devtools Protocol PHP client
===================================

[](#chrome-devtools-protocol-php-client)

[![Build](https://github.com/Fyrts/chrome-devtools-protocol/actions/workflows/phpunit.yml/badge.svg)](https://github.com/Fyrts/chrome-devtools-protocol/actions/workflows/phpunit.yml)[![Latest Stable Version](https://camo.githubusercontent.com/133bb150c4772a881d7a776beb52b61b2478232516c10c3fea624c450d32cd6d/68747470733a2f2f706f7365722e707567782e6f72672f66797274732f6368726f6d652d646576746f6f6c732d70726f746f636f6c2f762f737461626c653f666f726d61743d666c6174)](https://packagist.org/packages/fyrts/chrome-devtools-protocol)[![License](https://camo.githubusercontent.com/5fbe18f93d1f69948316d8f69abe1e29cf32cc928207dae659b8ed9b0ca13d98/68747470733a2f2f706f7365722e707567782e6f72672f66797274732f6368726f6d652d646576746f6f6c732d70726f746f636f6c2f6c6963656e73653f666f726d61743d666c6174)](https://packagist.org/packages/fyrts/chrome-devtools-protocol)

> PHP client for [Chrome Devtools Protocol](https://chromedevtools.github.io/devtools-protocol/).

Installation
------------

[](#installation)

`composer require fyrts/chrome-devtools-protocol`

Basic usage
-----------

[](#basic-usage)

```
// context creates deadline for operations
$ctx = Context::withTimeout(Context::background(), 30 /* seconds */);

// launcher starts chrome process ($instance)
$launcher = new Launcher();
$instance = $launcher->launch($ctx);

try {
	// work with new tab
	$tab = $instance->open($ctx);
	$tab->activate($ctx);

	$devtools = $tab->devtools();
	try {
		$devtools->page()->enable($ctx);
		$devtools->page()->navigate($ctx, NavigateRequest::builder()->setUrl("https://www.google.com/")->build());
		$devtools->page()->awaitLoadEventFired($ctx);

		// ... work with page ...
		// e.g.
		// - print to PDF: $devtools->page()->printToPDF($ctx, PrintToPDFRequest::make());
		// - capture screenshot: $devtools->page()->captureScreenshot($ctx, CaptureScreenshotRequest::builder()->setFormat("jpg")->setQuality(95)->build());

	} finally {
		// devtools client needs to be closed
		$devtools->close();
	}

} finally {
	// process needs to be killed
	$instance->close();
}
```

Headless Chrome isolated contexts
---------------------------------

[](#headless-chrome-isolated-contexts)

Headless Chrome supports feature called *browser contexts* - they're like incognito windows - cookies, local storage etc. are not shared. After *browser context* is destroyed, user data created in given context, are destroyed.

Unlike incognito windows, there can be multiple isolate *browser contexts* at the same time.

```
$ctx = Context::withTimeout(Context::background(), 10);
$launcher = new Launcher();
$instance = $launcher->launch($ctx);
try {
	$session = $instance->createSession($ctx);
	try {

		// $session implements DevtoolsClientInterface, same as returned from Tab::devtools()

	} finally {
		$session->close();
	}
} finally {
	$instance->close();
}
```

License
-------

[](#license)

Licensed under MIT license. See `LICENSE` file.

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance100

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 84.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

470

Last Release

2d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2fe7a44c5e07cf8dd0eed2941b88dcab03342fb149ede5347b3467bc17691d4e?d=identicon)[Fyrts](/maintainers/Fyrts)

---

Top Contributors

[![fyrts](https://avatars.githubusercontent.com/u/5918336?v=4)](https://github.com/fyrts "fyrts (488 commits)")[![jakubkulhan](https://avatars.githubusercontent.com/u/95001?v=4)](https://github.com/jakubkulhan "jakubkulhan (73 commits)")[![hongaar](https://avatars.githubusercontent.com/u/205834?v=4)](https://github.com/hongaar "hongaar (7 commits)")[![JanBukva](https://avatars.githubusercontent.com/u/7108035?v=4)](https://github.com/JanBukva "JanBukva (3 commits)")[![voldemortensen](https://avatars.githubusercontent.com/u/7786383?v=4)](https://github.com/voldemortensen "voldemortensen (1 commits)")[![mikenz](https://avatars.githubusercontent.com/u/6816?v=4)](https://github.com/mikenz "mikenz (1 commits)")[![mstyles](https://avatars.githubusercontent.com/u/1187931?v=4)](https://github.com/mstyles "mstyles (1 commits)")[![osbre](https://avatars.githubusercontent.com/u/23292709?v=4)](https://github.com/osbre "osbre (1 commits)")

---

Tags

webautomationchromeheadless-chromechrome-devtoolschrome-devtools-protocol

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fyrts-chrome-devtools-protocol/health.svg)

```
[![Health](https://phpackages.com/badges/fyrts-chrome-devtools-protocol/health.svg)](https://phpackages.com/packages/fyrts-chrome-devtools-protocol)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[jakubkulhan/chrome-devtools-protocol

Chrome Devtools Protocol client for PHP

189972.3k3](/packages/jakubkulhan-chrome-devtools-protocol)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
