# Has anyone found a solution for maximizing browser windows effectively in Playwright?

**URL:** https://club.ministryoftesting.com/t/has-anyone-found-a-solution-for-maximizing-browser-windows-effectively-in-playwright/72984
**Category:** Discussions
**Tags:** ask-me-anything, playwright, playwrightama
**Created:** [2 January 2024 15:34 UTC](https://club.ministryoftesting.com/t/has-anyone-found-a-solution-for-maximizing-browser-windows-effectively-in-playwright/72984 "2024-01-02T15:34:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sarahdeery](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/sarahdeery/32/11833_2.png) [@sarahdeery](https://club.ministryoftesting.com/u/sarahdeery)
#### Post date: [2 January 2024 15:34 UTC](https://club.ministryoftesting.com/t/has-anyone-found-a-solution-for-maximizing-browser-windows-effectively-in-playwright/72984/1 "2024-01-02T15:34:46Z")

</div>

During our Ask Me Anything session with @utchbe, Punit Chaudhari brought up a practical concern regarding Playwright:

> “Still haven’t found a solution for maximizing browsers properly, anyone know how to?”

This question is useful for consistency and replicating real user experiences in automated tests, any tips or insights would be appreciated.

---

<div class="post-metadata">

### Author: ![ipstefan](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/ipstefan/32/8279_2.png) [@ipstefan](https://club.ministryoftesting.com/u/ipstefan)
#### Post date: [2 January 2024 15:39 UTC](https://club.ministryoftesting.com/t/has-anyone-found-a-solution-for-maximizing-browser-windows-effectively-in-playwright/72984/2 "2024-01-02T15:39:33Z")

</div>

One can maximize a browser window to the resolution of the monitor that he is on.

In Playwright one can set a specific resolution that will be used for all automated checks. I chose 1920x1080 as that’s the most common worldwide and in our application.

> **[Desktop Screen Resolution Stats Worldwide | Statcounter Global Stats](https://gs.statcounter.com/screen-resolution-stats/desktop/worldwide)**
>
> This graph shows the stats of desktop screen resolutions worldwide based on over 5 billion monthly page views.

Resolution set:

- per case: [Page | Playwright](https://playwright.dev/docs/api/class-page#page-set-viewport-size)
- overall: in playwright.config.ts  
[Test configuration | Playwright](https://playwright.dev/docs/test-configuration#basic-configuration)  
use:{baseurl: ‘[https://club.ministryoftesting.com/](https://club.ministryoftesting.com/)’, viewport: { width: 1920, height: 1080 }}
