Skip to content

Headless Firefox on Windows produces smaller screenshots than non-headless with same window size #2240

@yasmineamer

Description

@yasmineamer

On Windows, Firefox headless produces screenshots with smaller dimensions than non-headless Firefox, even when the same window size is set.

For example, setting the window to 1792 × 1008:
Non-headless screenshot: 1792 × 1008 (correct) and without setting it.
Headless screenshot: ~837 × 471 (much smaller)
This makes headless mode incompatible with workflows that rely on consistent screenshot sizes (visual testing, coordinate-based automation, OCR, etc.).

Environment

OS: Windows 10 / 11
Firefox: 145.0.2
geckodriver: 0.36.x
Selenium: 4.x (Python)
Headless: yes
Non-headless: yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions