Repository navigation
fix(nightwatch): open the dashboard over WebDriver, not the devtools protocol - #423
Merged
vishnuv688 merged 1 commit intoOct 7, 2026
Merged
Conversation
…protocol automationProtocol 'devtools' needs the devtools package, so the plugin declared devtools ^8.42.0 as a peer and npm installed it, plus an old Puppeteer, into every project; without it the dashboard window failed to open. chromedriver is already resolved for the test sessions, so the dashboard uses it too. Same change as the WDIO service launcher.
|
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.
What & why
Same fix as #422, for the Nightwatch adapter.
The plugin opened the live-mode dashboard window with
remote({ automationProtocol: 'devtools' }). That protocol is implemented by thedevtoolspackage, so@wdio/nightwatch-devtoolsdeclareddevtools^8.42.0as a peer, and npm installed it together withpuppeteer-core@21into every Nightwatch project. When it was not installed, the dashboard failed to open (Couldn't find automation protocol "devtools") and the plugin fell back to logging "Please manually open" the URL.The dashboard now opens over WebDriver, through the same chromedriver the test sessions already use, and
devtoolsis no longer a peer:run-lifecycle.ts: dropautomationProtocol: 'devtools'; hide the "controlled by automated test software" bar with chromedriver'sexcludeSwitches: ['enable-automation']instead of the Puppeteer-onlywdio:devtoolsOptions.ignoreDefaultArgs(which also removes the capability-type assertion that existed only for it); quiet and restore thewebdriverlogger instead ofdevtoolswhile waiting for the window to close.package.json: remove thedevtoolspeer. The lockfile change is only that importer entry.tests/runLifecycle.test.ts: new. Nothing covered the dashboard launch before. One test asserts the launch options (noautomationProtocol,excludeSwitchesset, per-run--user-data-dirkept); the other asserts a launch failure leaves the run going. The first fails againstmain.patchfor@wdio/nightwatch-devtools.Type of change
Packages touched
shared(types and contracts)core(framework-agnostic capture/reporting)elements(published element/snapshot API —@wdio/elements)service(WebdriverIO adapter)nightwatch-devtools(Nightwatch adapter)selenium-devtools(Selenium adapter)selenium-devtools-py(Selenium Python adapter)backend(server)app(UI)script(page-injected runtime)trace(Trace mode)Notes for reviewers
core: the two adapters' launches differ in their capabilities (Nightwatch keeps a per-run--user-data-dirand its own close-wait loop with signal handling), and the shared part is now a singleremote({ capabilities })call. Each PR touches one adapter.DEVTOOLS_MODE=live pnpm demo:nightwatchopens the dashboard with no automation bar, nodevtools:puppeteerlines are logged, and closing the window ends the run. The example runs in trace mode by default, which never opens the dashboard, soDEVTOOLS_MODE=liveis needed to exercise this path.devtoolsentry underpackages/nightwatch-devtoolsis removed rather than letting pnpm re-resolve unrelated peers.pnpm install --frozen-lockfilepasses. Thedevtools@8.42.0package entries stay until both PRs are merged; a plainpnpm installafterwards prunes them.pnpm build,pnpm test(2501 passed),pnpm typecheckandpnpm lint(0 errors) are green locally.Screenshots / recordings
Not a UI change. The dashboard window looks the same as before; only how it is launched changed.