Skip to content

Build: update WebdriverIO to 10 and the BrowserStack service to 10.0.0 - #16338

Open
patmmccann wants to merge 3 commits into
prebid:masterfrom
patmmccann:agent/wdio-browserstack-15901
Open

patmmccann wants to merge 3 commits into
prebid:masterfrom
patmmccann:agent/wdio-browserstack-15901

Conversation

@patmmccann

Copy link
Copy Markdown
Collaborator

🤖 This PR was written by an AI agent (Claude Code) on behalf of @patmmccann.

Type of change

  • Build related changes
  • CI related changes

Description of change

Closes #15901.

@wdio/browserstack-service 10.0.0 (published 2026-11-25) is the first release that supports WebdriverIO 10: its peer range is @wdio/cli ^5 … || ^10, and it depends on webdriverio ^10 and the stable @percy/webdriverio ^3.3.5. That was the blocker on #15901, so this moves the WebdriverIO stack to 10 in one step:

Package From To
@wdio/browserstack-service ^9.44.1 ^10.0.0
webdriver, webdriverio, @wdio/cli, @wdio/local-runner, @wdio/mocha-framework ^9.32.0 ^10.2.0
@wdio/spec-reporter ^9.29.0 ^10.2.0

No v9 @wdio/* package is left in the tree, and @vitest/browser-webdriverio (peer webdriverio: *) now dedupes onto 10.2.0. Puppeteer was already on 25.16.0; its chromium-bidi 157 resolves zod 4.6.7, so no Zod 3 is left behind it. No --force, --legacy-peer-deps or overrides were used. The package-lock.json diff is large because WebdriverIO 10 drops ~190 transitive packages; every version change in it is in the WebdriverIO dependency tree.

Changes for the v10 migration guide:

  • .nvmrc 24.14.1 → 24.22.1. WebdriverIO 10 and the BrowserStack service require Node >=24.22.1 on the 24 line. engines in package.json is left alone: these are dev dependencies, and consumers of the package do not need them.
  • wdio.shared.conf.js: autoXvfb: false → displayServerEnabled: false (v10 replaces @wdio/xvfb with one display server for the run).
  • wdio.conf.js: the per-capability exclude → wdio:exclude. v10 ignores a bare capability exclude, which would have re-enabled the specs excluded for Chrome 50 / Firefox 65.
  • e2e sessions run on WebDriver Classic ('wdio:enforceWebDriverClassic': true in wdio.conf.js and wdio.local.conf.js). In v10 switchFrame throws in a BiDi session, and the e2e helpers switch into creative iframes. The Vitest BrowserStack provider already does the same.
  • test/helpers/testing-utils.js: browser.isW3C and browser.switchToFrame are removed in v10, and v10 cannot talk to JSON Wire servers at all, so the JSON Wire frame workaround goes. topFrame() now always calls switchFrame(null): on a Classic session that is what it did for legacy drivers, and the BiDi caveat that made it a no-op no longer applies.

Testing

  • npx gulp lint --nolintfix --files test/helpers/testing-utils.js,wdio.conf.js,wdio.local.conf.js,wdio.shared.conf.js: no errors (the wdio.*.conf.js files are lint-ignored).
  • Local e2e, Firefox 160 on Windows (BROWSER=firefox npx gulp e2e-test-nobuild --local): banner/basic_banner_ad.spec.js passes, including both "should render GAM creative" tests, which go through topFrame() and nested switchFrame(). The next worker failed to start a session with a local geckodriver "Session is already started" error, and bail: 1 stopped the run. Local Chrome could not start (the installed Chrome is older than the downloaded ChromeDriver 158). The full local e2e matrix (Chrome, Firefox, Edge, Safari) is left to CI.
  • BrowserStack runs only in CI because it needs the secrets. On a fork PR the ES5 E2E job and the BrowserStack Vitest jobs are skipped, so they need a run from a branch on prebid/Prebid.js or after merge.

Risk: Chrome 50 in the ES5 E2E job

browsers-es5.json runs the ES5 bundle on BrowserStack Chrome 50, which uses a JSON Wire ChromeDriver (2.x). That is the isW3C === false path removed above. WebdriverIO 10 is W3C-only, and the guide says a server that answers new-session in the JSON Wire format "cannot start a session". Unless BrowserStack's hub returns a W3C response for that image, Chrome 50 sessions will fail on v10. The oldest Chrome with a W3C ChromeDriver by default is 75. I left browsers-es5.json unchanged because the browser floor is a maintainer decision. That job is already failing on master, with Chrome 50 banner failures in run 45620377097.

Other information

Upstream: browserstack/wdio-browserstack-service#278 / #369 (WebdriverIO 10 support, released as 10.0.0), percy/percy-webdriverio#1518 (Percy 3.3.5).

🤖 Generated with Claude Code

@wdio/browserstack-service 10.0.0 is the first release with a @wdio/cli ^10
peer, so the WebdriverIO stack can move to 10 together:

- webdriver, webdriverio, @wdio/cli, @wdio/local-runner,
  @wdio/mocha-framework and @wdio/spec-reporter to ^10.2.0
- @wdio/browserstack-service to ^10.0.0
- .nvmrc to 24.22.1, the lowest Node 24 that WebdriverIO 10 supports

WebdriverIO 10 migration:
- autoXvfb is now displayServerEnabled
- capability-level exclude is now wdio:exclude
- e2e sessions run on WebDriver Classic: switchFrame throws in a BiDi
  session in v10
- browser.isW3C and switchToFrame are gone, along with the JSON Wire
  frame-switching workaround in the e2e helpers

Closes prebid#15901

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T18:11:49.964879Z 13b8a6b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13b8a6b9f1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json
Comment on lines +152 to +153
"webdriver": "^10.2.0",
"webdriverio": "^10.2.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Retain JSON Wire support for the Chrome 50 ES5 job

The BrowserStack-backed test-es5 job still selects browsers-es5.json (.github/workflows/test.yml:168–171), which includes Chrome 50. That image uses the JSON Wire ChromeDriver 2.x dialect handled by the legacy branch deleted from testing-utils.js, but WebdriverIO 10 no longer supports JSON Wire sessions. Setting wdio:enforceWebDriverClassic only disables BiDi; it does not restore legacy-protocol support. Consequently, upstream runs with BrowserStack credentials cannot start the Chrome 50 session, losing the ES5 coverage before any bundle assertions execute. Retain a JSON Wire-capable runner for this lane, or resolve the supported-browser floor before upgrading its client.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 This comment was written by an AI agent (Claude Code) on behalf of @patmmccann.

Agreed. 68d3f76 drops Chrome 50 from browsers-es5.json: the ES5 job now runs Chrome 75 (the oldest W3C ChromeDriver), Firefox 51 (geckodriver is W3C; it still lacks async/await, ** and object spread, so the old-browser syntax gate stays) and Firefox 65. Separately, the Chrome 50 lane has failed on master since #16314 because of NodeList.prototype.forEach, fixed in #16340.

WebdriverIO 10 only drives W3C sessions, and Chrome 50's ChromeDriver speaks
JSON Wire. Chrome 75 is the oldest W3C ChromeDriver; Firefox 51 (geckodriver,
W3C) still lacks async/await, ** and object spread, so it keeps an old-browser
syntax gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Build: upgrade WebdriverIO and companion packages to v10 (blocked by BrowserStack)

1 participant