Skip to content

Conversation

Copy link

Copilot AI commented Dec 6, 2025

Adds ability to connect to remote browser services via Chrome DevTools Protocol instead of launching a local browser.

Changes

  • src/index.ts: Added initBrowser() function that uses chromium.connectOverCDP() when BROWSER_WS_ENDPOINT is set, falls back to local browser otherwise
  • .env.example: Documented new BROWSER_WS_ENDPOINT variable with examples for BrowserStack and LambdaTest
  • README.md: Added remote browser configuration section with environment variable reference
  • tests/browser-config.spec.ts: Tests for environment variable parsing logic

Usage

# BrowserStack
BROWSER_WS_ENDPOINT=wss://cdp.browserstack.com/playwright?caps=<encoded_caps>

# LambdaTest
BROWSER_WS_ENDPOINT=wss://cdp.lambdatest.com/playwright?capabilities=<encoded_caps>

When unset, behavior is unchanged (local browser).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fake.test.endpoint
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/web-capture/web-capture/node_modules/.bin/ts-node ./src/index.ts git ome-�� *.ts&#34; --fix --global /home/REDACTED/.local/bin/git credential.usernldd (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Add support remote browser like browserstack or lamdatest</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…est)

Co-authored-by: npv2k1 <73846954+npv2k1@users.noreply.github.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 6, 2025

Copilot AI changed the title [WIP] Add support for remote browser testing frameworks Add support for remote browsers via CDP (BrowserStack, LambdaTest) Dec 6, 2025
Copilot AI requested a review from npv2k1 December 6, 2025 02:50
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.

Add support remote browser like browserstack or lamdatest

2 participants