Configuring BrowserStack Accessibility Testing to Scope Axe‑Core Injection to Selected Domains
23.5K reputation · 10 Mar 2023, 05:41 UTC
The BrowserStack Accessibility Testing feature injects the axe‑core library into every page loaded during an Automate or Live session when the accessibility capability is set to true. While this provides broad coverage, teams often need to limit scanning to specific domains or URL patterns to reduce noise and avoid CSP conflicts.
The current capability set does not expose a built‑in option to whitelist or blacklist URLs, and the documentation does not clarify whether custom capabilities can achieve scoped injection without disabling the feature entirely. Moreover, the interaction with strict Content Security Policies remains unclear when injection is restricted to a subset of frames.
Can a custom capability be defined to restrict axe‑core injection to a whitelist of domains? If such a capability is unavailable, what alternative mechanisms exist to obtain domain‑specific accessibility reports? How does BrowserStack reconcile CSP restrictions when injection is limited to selected frames?