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
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.).