Skip to content

docs: cover hosted Chromium and existing CDP tabs - #230

Open
laotoutou wants to merge 1 commit into
playwright-php:mainfrom
laotoutou:docs-hosted-chromium-cdp
Open

laotoutou wants to merge 1 commit into
playwright-php:mainfrom
laotoutou:docs-hosted-chromium-cdp

Conversation

@laotoutou

Copy link
Copy Markdown

Summary

The external-browser guide explains local HTTP discovery. This change also shows where a hosted browser's complete browser-level WebSocket URL goes and how to install just the local bridge for that workflow. The CDP example reads existing tab titles without replacing the page the user joined to inspect. It closes the connection and bridge in finally blocks.

Verification

  • Linted the PHP snippet with PHP 8.4.28 and installed the bridge using the documented command, without browser binaries.
  • Ran the exact snippet twice in separate PHP processes using Playwright PHP 1.6.0 and its installed Playwright 1.65.2 bridge, against a disposable Chromium browser over CDP.
  • Both processes found the seeded tab. An independent CDP client confirmed its URL and page content were unchanged after each PHP process disconnected.

I work on Cloudbrowser and used AI assistance for this change. The hosted Chromium used in the test was supplied by Cloudbrowser. The link in the guide shows how to obtain a browser-level endpoint of that format.

If useful, the same example could be carried over to the public External Browsers guide. I made the change in the package's Markdown source because the website repository marks its checked-in HTML as generated output.

@codecov

codecov Bot commented Dec 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant