Skip to content

fix(browserstack-service): route browserstack_executor commands via HTTP/S in BiDi sessions - #118

Open
smarkows wants to merge 1 commit into
browserstack:mainfrom
smarkows:fix/bidi-browserstack-executor-http
Open

fix(browserstack-service): route browserstack_executor commands via HTTP/S in BiDi sessions#118
smarkows wants to merge 1 commit into
browserstack:mainfrom
smarkows:fix/bidi-browserstack-executor-http

Conversation

@smarkows

@smarkows smarkows commented Aug 1, 2026

Copy link
Copy Markdown

Ports webdriverio/webdriverio#15216 (by @RohanImmanuel) into this repo.

In BiDi sessions, browser.execute() routes over WebSocket directly to the browser, bypassing BrowserStack's HTTP hub, so browserstack_executor: commands fail silently. This overwrites the execute command in BiDi sessions to route executor-prefixed scripts through executeScript (which always uses HTTP/S), leaving all other scripts untouched. Handles both single-browser and multiremote setups, wrapped in try/catch so a patch failure can't break init.

Credit: original implementation by @RohanImmanuel in webdriverio/webdriverio#15216.

🤖 Generated with Claude Code

…TTP/S in BiDi sessions

In BiDi sessions, browser.execute() routes over WebSocket directly to the
browser, bypassing BrowserStack's HTTP hub, so browserstack_executor:
commands fail silently. Overwrite the execute command in BiDi sessions to
route executor-prefixed scripts through executeScript (which always uses
HTTP/S), leaving all other scripts untouched. Handles single-browser and
multiremote setups.

Ported from webdriverio/webdriverio#15216.

Co-Authored-By: RohanImmanuel <RohanImmanuel@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@smarkows
smarkows requested a review from a team as a code owner August 1, 2026 00:43
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