[💡 Feature]: Add Native Browser Zoom In/Out Support in WebdriverIO
#14.810 geöffnet am 8. Okt. 2025
Beschreibung
Is your feature request related to a problem?
Currently, WebdriverIO does not provide a built-in or reliable method to programmatically control native browser-level zoom (e.g., zooming in to 150% or zooming out to 50%).
While approaches such as document.body.style.zoom or CSS transform: scale() can visually resize the content, they do not replicate actual browser zoom behavior — leading to layout distortions, inaccurate element positions, and mismatched test results during UI automation and visual regression testing.
Furthermore, simulated keyboard shortcuts (Ctrl/Cmd + "+" or "-") are not consistently recognized across platforms (Mac/Windows) and browsers due to WebDriver limitations. Similarly, CDP commands like Emulation.setPageScaleFactor are only available through Chrome DevTools, which are not integrated by default in WebdriverIO v9.
Describe the solution you'd like.
To enhance test reliability and visual accuracy, we propose adding native browser zoom control APIs to WebdriverIO, such as:
await browser.setZoom(1.5); // 150% zoom
await browser.setZoom(0.5); // 50% zoom
await browser.resetZoom(); // Restore to 100%
Describe alternatives you've considered.
No response
Additional context
No response
Code of Conduct
- I agree to follow this project's Code of Conduct