WebUI.maximizeWindow() NOT working in headless mode

WebUI.maximizeWindow() NOT working in headless mode.

Anyone else us facing/faced this issue as well? Thanks in advance for your valuable feedback.

1 Like

can you share the error trace

maximizeWindow() never works in headless mode, it is a limitation of headless mode, because it was meant for computers with no screens, so the size of the screen (which would be the max) is not known.

You can:

  1. Set the window to a size with WebUI.setViewPortSize(int width, int height)

  2. Set it in the desired capabilities Set up Desired Capabilities for WebUI Testing in Katalon Studio | Katalon Docs
    But here you also can’t use the --start-maximized arg, you have to specify the width and height of the window, for it to work in headless for example for chrome: --window-size=w,h