# 🖥️ Responsive or Broken? How do you handle different screen resolutions?

**URL:** <https://forum.katalon.com/t/responsive-or-broken-how-do-you-handle-different-screen-resolutions/190026>\
**Category:** Web Testing\
**Created:** [April 13, 2026, 2:51pm UTC](https://forum.katalon.com/t/responsive-or-broken-how-do-you-handle-different-screen-resolutions/190026 "2026-04-13T14:51:03Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![qurzunta.kaab](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/qurzunta.kaab/32/31470_2.png) [@qurzunta.kaab](https://forum.katalon.com/u/qurzunta.kaab)\
**Post date:** [April 13, 2026, 2:51pm UTC](https://forum.katalon.com/t/responsive-or-broken-how-do-you-handle-different-screen-resolutions/190026/1 "2026-04-13T14:51:04Z")

</div>

**Hi Everyone!**

We’ve all experienced that “it works on my machine” moment, only to find out the test fails in the CI/CD pipeline or on a colleague’s laptop because the resolution is different.

Elements overlap, buttons hide behind floating footers, or—my personal favorite—the “Click” hits the wrong coordinates because of browser scaling.

I’m curious to know how this community ensures their Katalon tests are truly **resolution-independent.**

### **A few ways I’ve seen people handle this:**

- **The “Maximize” Approach:** Simply using `WebUI.maximizeWindow()` at the start of every script. (Simple, but does it cover enough?)

- **The Fixed Standard:** Setting a specific viewport size (e.g., $1920 \times 1080$) in the Desired Capabilities to ensure consistency across all environments.

- **The Smart Viewport:** Using `WebUI.setViewPortSize()` to explicitly test Mobile, Tablet, and Desktop layouts within a single suite.

### **The Big Question:**

How do you tackle this?

1. Do you rely on **Smart Wait** and **Self-Healing** to find shifted elements?

2. Do you have a specific **Custom Keyword** that handles window resizing?

**Drop your tips, tricks, or “horror stories” below!** Let’s help each other build more robust UI tests. 🚀

---

<div class="post-metadata">

**Author:** ![Elly\_Tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/elly_tran/32/21874_2.png) [@Elly\_Tran](https://forum.katalon.com/u/Elly_Tran)\
**Post date:** [April 13, 2026, 2:51pm UTC](https://forum.katalon.com/t/responsive-or-broken-how-do-you-handle-different-screen-resolutions/190026/2 "2026-04-13T14:51:04Z")

</div>

Hi there, and thanks for posting in the Katalon community! 🤗

To help you faster, please review our guide on Custom Keyword here: [Introduction to custom keywords in Katalon Studio | Katalon Docs](https://docs.katalon.com/katalon-studio/keywords/custom-keywords/introduction-to-custom-keywords-in-katalon-studio). Double-checking the steps and configurations might resolve the issue.

If the doc doesn’t help, feel free to provide more details, and a community member will assist you soon. Thanks for being a part of our community!

Best,  
Elly Tran

---

<div class="post-metadata">

**Author:** ![nghi.phan](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/nghi.phan/32/30970_2.png) [@nghi.phan](https://forum.katalon.com/u/nghi.phan)\
**Post date:** [April 14, 2026, 4:03am UTC](https://forum.katalon.com/t/responsive-or-broken-how-do-you-handle-different-screen-resolutions/190026/3 "2026-04-14T04:03:52Z")

</div>

Maybe @depapp have some ideas 🥳

---

<div class="post-metadata">

**Author:** ![aeffertz](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@aeffertz](https://forum.katalon.com/u/aeffertz)\
**Post date:** [April 15, 2026, 1:42am UTC](https://forum.katalon.com/t/responsive-or-broken-how-do-you-handle-different-screen-resolutions/190026/4 "2026-04-15T01:42:09Z")

</div>

Does headless mode has any impact if we select screensize at max ? @qurzunta.kaab

---

<div class="post-metadata">

**Author:** ![dineshh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dineshh/32/24488_2.png) [@dineshh](https://forum.katalon.com/u/dineshh)\
**Post date:** [April 15, 2026, 6:40am UTC](https://forum.katalon.com/t/responsive-or-broken-how-do-you-handle-different-screen-resolutions/190026/5 "2026-04-15T06:40:13Z")

</div>

**Fixed viewport + matrix testing** : **No “works on my machine”** —standardize then emulate devices.

## Strategy

```auto
WebUI.setViewPortSize(1920, 1080) // Desktop baseline EVERY test

```

**Matrix** : Test Suite Collection \> Data-driven rows:

| Browser | Width | Height |
| --- | --- | --- |
| Chrome | 1920 | 1080 |
| Chrome | 375 | 667 |
| Firefox | 1366 | 768 |

## Custom Keyword

```auto
@Keyword
void testResponsive(int width, int height) {
    WebUI.maximizeWindow()
    WebUI.setViewPortSize(width, height)
    WebUI.delay(2) // Render
}

```

**CI** : Headless Chrome + fixed viewport. Covers 95% devices!

---

<div class="post-metadata">

**Author:** ![depapp](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/depapp/32/29178_2.png) [@depapp](https://forum.katalon.com/u/depapp)\
**Post date:** [April 22, 2026, 5:59am UTC](https://forum.katalon.com/t/responsive-or-broken-how-do-you-handle-different-screen-resolutions/190026/6 "2026-04-22T05:59:31Z")

</div>

`maximizeWindow()` is unreliable since screen sizes vary and headless Chrome defaults to 800x600 anyway. Use `WebUI.setViewPortSize(1024, 768)` instead, or pass dimensions from a data file if you need multiple sizes.

Smart Wait and Self-Healing can’t fix elements hidden off-screen. For CI, set the Chrome `--window-size` argument in Project Settings so the browser matches what your test expects.

---

<div class="post-metadata">

**Author:** ![arvind.choudhary](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/arvind.choudhary/32/33165_2.png) [@arvind.choudhary](https://forum.katalon.com/u/arvind.choudhary)\
**Post date:** [April 22, 2026, 11:03am UTC](https://forum.katalon.com/t/responsive-or-broken-how-do-you-handle-different-screen-resolutions/190026/7 "2026-04-22T11:03:48Z")

</div>

In my experience, I prefer using  
`WebUI.setViewPortSize(1920, 1080)`  
instead of relying on `maximizeWindow()`.

Maximizing the window can behave differently across machines, browsers, OS settings, or CI agents, whereas explicitly setting the viewport gives more **predictable and consistent results** across environments.

That said, my long‑term conclusion is this:

**Most resolution issues are actually locator issues in disguise.**

Many overlap or misclick problems usually come from:

- Using **absolute XPaths**

- Clicking **parent containers** instead of truly interactable child elements

- Forgetting to ensure **scroll visibility** before interaction

What helped us far more than just resizing the browser:

- Prefer **attribute‑based, relative locators**

- Always ensure elements are **visible and clickable** before interacting

- Perform **explicit scrolling only when necessary**

In short, window size matters—but **robust locators and interaction logic matter much more** for building stable, resolution‑independent tests.

---

<div class="post-metadata">

**Author:** ![gaborrnagyy](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@gaborrnagyy](https://forum.katalon.com/u/gaborrnagyy)\
**Post date:** [April 22, 2026, 2:24pm UTC](https://forum.katalon.com/t/responsive-or-broken-how-do-you-handle-different-screen-resolutions/190026/8 "2026-04-22T14:24:23Z")

</div>

+1 for using setViewPortSize instead of maximizeWindow, especially in CI.

Also agree that a lot of resolution issues turn out to be locator problems. Fixing visibility and using better selectors usually does more than tweaking screen size.

---

<div class="post-metadata">

**Author:** ![arvind.choudhary](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/arvind.choudhary/32/33165_2.png) [@arvind.choudhary](https://forum.katalon.com/u/arvind.choudhary)\
**Post date:** [April 22, 2026, 5:15pm UTC](https://forum.katalon.com/t/responsive-or-broken-how-do-you-handle-different-screen-resolutions/190026/9 "2026-04-22T17:15:37Z")

</div>

Yes, very true

---

<div class="post-metadata">

**Author:** ![fmcclure](https://avatars.discourse-cdn.com/v4/letter/f/91b2a8/32.png) [@fmcclure](https://forum.katalon.com/u/fmcclure)\
**Post date:** [June 14, 2026, 10:36am UTC](https://forum.katalon.com/t/responsive-or-broken-how-do-you-handle-different-screen-resolutions/190026/10 "2026-06-14T10:36:06Z")

</div>

I use screen maximize approch
