-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Describe the bug
Original Report: webdriverio/webdriverio#14927
Reproduction Repo: https://github.com/chrisguttandin/vitest-webdriverio
Root Cause
The @vitest/browser-webdriverio package's setViewport method unconditionally uses a WebDriver BiDi command without checking if BiDi is actually available:
Why This Fails
Safari on GitHub Actions may not support WebDriver BiDi yet OR the BiDi session wasn't established
User sets 'wdio:enforceWebDriverClassic': true to explicitly disable BiDi
WebdriverIO respects this and doesn't create a BiDi session (no webSocketUrl in capabilities)
Vitest's provider ignores this and tries to use BiDi commands anyway
Result: Command fails because no BiDi session exists
we need to check BiDi availability before using BiDi commands, and fall back to WebDriver Classic commands when BiDi isn't available.
Reproduction
Original Report: webdriverio/webdriverio#14927
Reproduction Repo: https://github.com/chrisguttandin/vitest-webdriverio
System Info
Original Report: https://github.com/webdriverio/webdriverio/issues/14927
Reproduction Repo: https://github.com/chrisguttandin/vitest-webdriverioUsed Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.