Repository navigation
fix(local-browser): disable AutomationControlled only in headless Chrome/Edge - #186
Merged
Winify merged 1 commit intoNov 5, 2026
Merged
Conversation
…ome/Edge The flag sat in the unconditional chromiumArgs list, so headed sessions also reported navigator.webdriver = false, and user args cannot undo it because Chrome merges repeated --disable-blink-features values. Push it next to --headless=new, matching the intent of webdriverio#159. Fixes webdriverio#185 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
[Low impact] The PR appears safe to merge. SummaryLimits
Reviews (1) · Last reviewed commit: "fix(local-browser): disable AutomationCo..." · Reviewed by Greptile |
Winify
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Fixes #185
--disable-blink-features=AutomationControlledmoves from the unconditionalchromiumArgslist into theeffectiveHeadlessblock, next to--headless=new. This matches the description of #159, which scoped the flag to headless sessions.Headed Chrome/Edge sessions report
navigator.webdriver === trueagain, so apps under test that check it can detect automation. Userargscould not undo the flag, because Chrome merges repeated--disable-blink-featuresvalues.src/providers/local-browser.provider.tseffectiveHeadlessis truetests/providers/local-browser.provider.test.tsheadless: true; a new case checks that headed Chrome/Edge do not get the flagHow you tested
npx vitest run tests/providers/local-browser.provider.test.tswithsrc/frommainpnpm testeslint src/ tests/,tsc --noEmitReal browser: Chromium 156 under
xvfb-runinmcr.microsoft.com/playwright:v1.64.0-noble. The script calledstartSessionTool(provider: 'local',browser: 'chrome') and thenexecuteScriptToolwithreturn navigator.webdriver:headlessmainfalsefalsetruetruefalsefalseTypes of changes
Checklist
Further comments
The real-browser check called the tool callbacks directly rather than through an MCP client, so the client checkbox is left unchecked.
Reviewers: @webdriverio/project-committers
🤖 Generated with Claude Code