Skip to content

Add BrowserStack SDK sample (Node · Jest · Playwright · Automate)#1

Closed
AakashHotchandani wants to merge 4 commits into
browserstack:mainfrom
AakashHotchandani:sdk
Closed

Add BrowserStack SDK sample (Node · Jest · Playwright · Automate)#1
AakashHotchandani wants to merge 4 commits into
browserstack:mainfrom
AakashHotchandani:sdk

Conversation

@AakashHotchandani

Copy link
Copy Markdown
Collaborator

Jest+Playwright sample. Uses @playwright/test and pins browserstack-node-sdk 1.49.3 (1.55.x regresses the Playwright launch patcher).
Live status: PASSED on desktop (macOS/Chrome, Windows/Edge); Android is a Playwright-on-mobile edge case.

Generated via the SDK sample-repo generator. Tracking: SDK-6221.

claude and others added 4 commits June 3, 2026 16:59
…mate)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Removes the postinstall `npm update browserstack-node-sdk` (supply-chain /
install-time-execution vector that bypasses lockfile pinning). The
browserstack-node-sdk `latest` dependency already resolves to the current
SDK on `npm install`, so the postinstall was redundant.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The BrowserStack Node SDK keys Playwright detection (__isPlaywrightInstalled)
on @playwright/test and patches THAT module's BrowserType. Importing the
standalone 'playwright' package left launch() unpatched. Resolves the
preInitialize compareVersions crash. (Live launch interception still under
review with the SDK team.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…regression)

Verified live: with @playwright/test + sdk 1.49.3 the Playwright launch is
intercepted and BrowserStack sessions run (macOS/Chrome + Windows/Edge passed).
sdk 1.55.x regresses the launch patcher (throws 'session_' undefined -> silent
local-launch fallback). Aligned deps to the working reference (jest-js-pw):
@playwright/test 1.55.0, selenium-webdriver, jest 29.7.0, matching jest.config.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@AakashHotchandani AakashHotchandani requested a review from a team as a code owner June 5, 2026 06:09
@AakashHotchandani

Copy link
Copy Markdown
Collaborator Author

Superseded — the SDK sample has been pushed directly to the sdk branch of this repo (now that write access is granted), following the repo's sdk-branch convention. Closing this fork PR.

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.

2 participants