Repository navigation
Conversation
…cans setupBrowserStackAutomateTests gains two options (ATA-1480): - accessibility: adds `accessibility: true` to browserstack.yml (or the Cypress/WebdriverIO setting), asks for a test of the user's flow when there is none, and says how to read the issues with fetchAccessibilityIssues after the run. - runOnLocalBrowser: `browserstackAutomation: false` with one local Chrome platform and no tunnel, so a user without an Automate license can still get a flow's accessibility issues. Selenium runs on Chrome for Testing through SE_FORCE_BROWSER_DOWNLOAD (installed Chrome 142+ blocks the scanner); Playwright on its bundled Chromium. Cypress and WebdriverIO are refused: BrowserStack documents no local run for them. The tool and startAccessibilityScan descriptions route a user flow here, within their budgets. A "Build not found" also names the other cause seen in testing: a build run under a different account than the server's. Checked end to end with the Python SDK (1.51.2) on bstackdemo.com: the local run found 130 issues, 129 of them the same as the same test on BrowserStack infra. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
…gents look In a first end-to-end test (Claude Code, strict MCP config) the agent never loaded setupBrowserStackAutomateTests: clients that defer tools show only names until one is loaded, and it read "Automate" in the name as "needs an Automate license", then fell back to its own Playwright + axe-core script. It had loaded startAccessibilityScan and accessibilityExpert, so those now say a flow runs without one (runOnLocalBrowser), within their budgets. In two headless re-runs with the same isolation, the agent called setupBrowserStackAutomateTests with accessibility and runOnLocalBrowser on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e for it Checked the Node + Playwright local path end to end (browserstack-node-sdk 1.75.1, Playwright 1.64.1, bstackdemo.com), which is what an agent picks when the user has no tests: - Playwright's default 30 s test timeout fails the scanned run: every action waits for a scan of a few seconds. The flow step now asks for a timeout of several minutes. - On Playwright's default headless shell the SDK logged every scan as succeeded (~10 s each) and saved a report with 0 issues: the shell loads no extension. With channel: "chromium" the same test saved 199 issues, 125 of the 130 the Selenium run found. The browser step now says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The second end-to-end test (Claude Code, strict MCP config) routed to setupBrowserStackAutomateTests and followed its steps, but its playwright.config set channel: "chromium" without browserName. The Node SDK (1.75.1) reads use.browserName itself: unset, its isSupportedPlaywright check throws "Cannot read properties of undefined (reading 'match')", logs "Not a valid Accessibility Automation session", and the test passes with no scans and an empty report. Reproduced by removing only browserName from a config that had saved 199 issues: 0 scans. The Playwright step now asks for both browserName and channel, and notes Playwright's Node.js 20 floor (the test machine defaulted to Node 18). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Jira: ATA-1480 — running a workflow accessibility scan without an Automate license.
Why
A user without an Automate license who asks for the accessibility issues of a user flow has no route today:
setupBrowserStackAutomateTestsonly sets up runs on BrowserStack, and itsbrowserstack.ymlnever turns accessibility on (noaccessibility: trueanywhere insdk-utils).startAccessibilityScancovers one page, not a flow.The SDK already supports running tests in a local browser with
browserstackAutomation: false: it loads its scanner into that browser, and no Automate session is created. This PR has the MCP set that up.What changes
setupBrowserStackAutomateTestsgains two optional parameters. Leaving both off gives exactly the output it gives today.accessibilityaccessibility: trueinbrowserstack.yml(for Cypress:run_settings; for WebdriverIO: the service options); a step that writes a test for the user's flow when none exists, gets it passing without the SDK first, and gives it a timeout of several minutes; a step to read the issues withfetchAccessibilityIssuesusing the run'sthBuildIdrunOnLocalBrowserbrowserstackAutomation: false, one platform (chrome,browserVersion: latest, marked required),browserstackLocal: false, no device validation; a step to upgrade the SDK; Chrome for Testing for Selenium (SE_FORCE_BROWSER_DOWNLOAD=true, no code change), or Playwright on full Chromium named in full (browserName: "chromium"andchannel: "chromium"). Cypress and WebdriverIO are refused with an error, because BrowserStack documents no local run for themRouting (within each tool's description budget; no server-wide text, following the #511 review):
setupBrowserStackAutomateTestsmentions local runs and accessibility (328 → 323 chars).startAccessibilityScan(200) andaccessibilityExpert(184) say a user flow goes tosetupBrowserStackAutomateTestswith no Automate license needed. Clients that defer tools show only tool names until one is loaded, and in the first end-to-end test the agent read "Automate" in the name as "needs a license", then wrote its own Playwright + axe-core script instead. It had loaded these two tools, so they now carry the pointer (2ba0804).Also:
fetchAccessibilityIssues"Build not found" now also names the cause hit in testing: the build ran under a different account than the server's.docs/TOOLS.mdrows are updated.Evidence (bstackdemo.com sign-in → cart → checkout, local machine)
fetchAccessibilityIssuesSE_FORCE_BROWSER_DOWNLOAD=true, no binary path in the testbrowserVersioninplatforms(2 runs)accessibility: falseand nothing reached the dashboardchannel: "chromium"channel: "chromium"but nobrowserName(what the agent wrote in end-to-end test #2)isSupportedPlaywrightthrows on the unsetbrowserName. The step now requires it (latest commit)setupBrowserStackAutomateTestswithaccessibilityandrunOnLocalBrowserUnit tests:
tests/tools/sdk-utils-local-accessibility.test.ts(yml for local, cloud and plain runs; steps for pytest local, Playwright local, Cypress refused, WebdriverIO accessibility, and a plain run unchanged), plus a routing test inaccessibility.test.ts. 1481 tool tests pass.Not verified yet
SDK-side follow-ups (not in this PR)
browserVersionsaves nothing and raises no error.use.browserNameunset (Playwright's own default), the Node SDK throws inisSupportedPlaywright(reading 'match') and runs the test without scanning.npx browserstack-node-sdk setup --username … --key …(pre-existing, not changed here) fails with "Not a valid command" on browserstack-node-sdk 1.75.1.🤖 Generated with Claude Code