vitest-dev / vitest-dev/vitest

When browser.viewport is set and with the webdriver backend, sometimes parts of the app are unreachable

Open
#8,723 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feat: browser p3-minor-bug webdriverio
Dominant language
TypeScript
Stars
17.1k
Forks
2k
Avg merge
1d 22h
Merged PRs (30d)
94

Description

Describe the bug

I got this issue in the context of Webdriver + Firefox, where a button was in the viewport but not visible. In that case the click on the button succeeded but no action really appeared.

I can see several issues:

  1. Chrome is launched fullscreen but Firefox is launched as a window, so the issue can happen much more easily in Firefox.
  2. With playwright the application is "zoomed out" so that the viewport fits in the available space, but in webdriver the zoom level is always 100% (both in Chrome and Firefox). I don't know if that's a issue with webdriver or vitest or vitest's configuration of webdriver.
  3. Part of the issue, I think, is also that vitest's interface can not be scrolled.
  4. In Chrome, when running the test after reducing the window size, I get an error but in Firefox there's no error making the issue silent -- This is probably rather a bug in Firefox and I'll report it there too (bug 1994715).
Reproduction

You can find a testcase in this repository: https://github.com/julienw/vitest-browser-mode-viewport-click
The main branch uses webdriver while the playwright branch uses playwright so that it's easy to compare.

System Info
System:
    OS: Linux 6.7 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz
    Memory: 29.55 GB / 62.54 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 24.8.0 - /home/julien/.nvm/versions/node/v24.8.0/bin/node
    Yarn: 1.22.22 - /usr/bin/yarn
    npm: 11.6.0 - /home/julien/.nvm/versions/node/v24.8.0/bin/npm
    pnpm: 10.9.0 - /home/julien/.local/share/pnpm/pnpm
    bun: 1.0.29 - /home/julien/.bun/bin/bun
    Deno: 2.0.0 - /home/julien/.cargo/bin/deno
    Watchman: 4.9.0 - /usr/bin/watchman
  Browsers:
    Chrome: 139.0.7258.127
    Chromium: 139.0.7258.127
    Firefox: 128.13.0esr
    Firefox Developer Edition: 128.13.0esr
  npmPackages:
    @vitest/browser: ^3.2.4 => 3.2.4 
    playwright: ^1.49.1 => 1.56.0 
    vite: ^7.1.10 => 7.1.10 
    vitest: ^3.2.4 => 3.2.4 
    webdriverio: ^9.20.0 => 9.20.0
Used Package Manager

npm

Validations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked vitest-browser-mode-viewport-click reproduction and compare its main webdriver branch with the playwright branch. Investigate the reported browser viewport, window size, zoom, and scrolling behavior in the reproduction; done means the webdriver case no longer allows clicks on unreachable or invisible parts of the application without a visible result.

Written by the indexing model from the issue text.

Assessment

Tech stack
playwright, typescript, vite
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.