Katalon Studio WebUI local browser viewport/window size

Hello,

I’m a newbie to Katalon Studio and wondering if there is a way to set a default window size for browsers on a local machine as it seems Safari loads in a different window size to Chrome/Firefox.

I have already experimented with Remote Server which sets a screen resolution, but for Katalon Studio is there a way to set WebUI browser size? separate to setting a viewport size in a script.

Tony

You can do it in script for sure. But to alter it outside of a script… not sure. Perhaps Desire Capabilities would be the route to take…

Callout to @Brandon_Hein (re Desired Capabilities)

Hi @Russ_Thomas

Yep, I tested the SetViewPortSize within scripts which works great but if connecting to a remote server which is already going to be configured to have a screen resolution size, it would be nice if I could just set a viewport size globally in Katalon for select browser (local testing) same as remote, instead of having to make sure SetViewPortSize is added to each script.

I did look at Desired Capabilities, but I could not get anything to size browser window following any Katalon docs on WebUI Viewport sizing, I tried various items/values but nothing was working for me.

The only other solution I’m aware of…

1.) Navigate to Project > Settings > Desired Capabilities > WebUI > Chrome:
2.) Click the Add button, and set Name = args, Type = List
3.) Under the Value column, click the ellipses.
4.) In the List Property Builder, click the Add button, then set Type = String, Value = window-size=x,y
5.) Set x,y in the value above to your desired dimensions, for example 1920,1080:

6.) Click OK, then OK again.
7.) Do steps 1-6 for firefox as well.

1 Like

I’ll also add that if you want to just start with the browser maximized (i.e. fit to the dimensions of your main display), add this argument, instead of the window-size=x,y argument:

start-maximized

Hi @Brandon_Hein

That’s so helpful and does work for Chrome/Firefox…Is there a solution for sizing Safari window?

I haven’t worked with Safari, but I believe the same arguments would work.

It didn’t work on Safari, just Chrome & Firefox…I will search about Safari equivalent for sizing.

Thanks again for the above

2 Likes

@Brandon_Hein
For me it doesnt work on either Chrome or Firefox…
I got the latest Webdrivers for both and i`m on KS 7.2.1.

Could you please verify if my settings are right?
image

Edit: Only Firefox isnt Working now