Skip to content

docs(remote): document hosted Chrome over CDP - #408

Closed
laotoutou wants to merge 1 commit into
rubycdp:mainfrom
laotoutou:docs-hosted-chrome-cdp
Closed

laotoutou wants to merge 1 commit into
rubycdp:mainfrom
laotoutou:docs-hosted-chrome-cdp

Conversation

@laotoutou

Copy link
Copy Markdown

Summary

Add a standalone Capybara example to the remote-browser section of the Docker guide. It registers Cuprite using a complete browser-level WebSocket URL, sets a separate application origin, and turns off Capybara's local server when the browser must reach an app already running elsewhere.

The example recommends a browser reserved for the test run. Cuprite can reuse a tab that is already open, so a test can navigate that tab.

Verification

  • ruby -c hosted-chrome.rb passed for the extracted snippet.
  • Ran the same snippet using Ruby 3.4.6, Cuprite 0.22, Ferrum 0.22.0, and Capybara 3.40.0. A separate CDP client served one synthetic test origin in the disposable Chrome, with outbound browser networking blocked. Cuprite read the expected title. A separate connection after session.driver.quit found the test tab still open.
  • This changes one documentation page.

I work on Cloudbrowser, which supplied the disposable browser. The link in the guide is one example of obtaining a hosted WebSocket endpoint.

@route

route commented Dec 2, 2026

Copy link
Copy Markdown
Member

That's called promotion

@route route closed this Dec 2, 2026
@rubycdp rubycdp locked as off-topic and limited conversation to collaborators Dec 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants