# How do I maximize Browser while running Katalon script through Jenkins?

**URL:** <https://forum.katalon.com/t/how-do-i-maximize-browser-while-running-katalon-script-through-jenkins/29255>\
**Category:** Web Testing\
**Tags:** web-testing, katalon-studio\
**Created:** [July 5, 2019, 10:50pm UTC](https://forum.katalon.com/t/how-do-i-maximize-browser-while-running-katalon-script-through-jenkins/29255 "2019-07-05T22:50:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![manpreet.mukkar](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/manpreet.mukkar/32/16103_2.png) [@manpreet.mukkar](https://forum.katalon.com/u/manpreet.mukkar)\
**Post date:** [July 5, 2019, 10:50pm UTC](https://forum.katalon.com/t/how-do-i-maximize-browser-while-running-katalon-script-through-jenkins/29255/1 "2019-07-05T22:50:35Z")

</div>

How do I maximize Browser while running Katalon script through Jenkins ?

I am noticing that the WebUI.maximizeWindow() doesn’t make any difference on Linux Server with Jenkins.

---

<div class="post-metadata">

**Author:** ![Brandon\_Hein](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/brandon_hein/32/1092_2.png) [@Brandon\_Hein](https://forum.katalon.com/u/Brandon_Hein)\
**Post date:** [July 8, 2019, 3:43am UTC](https://forum.katalon.com/t/how-do-i-maximize-browser-while-running-katalon-script-through-jenkins/29255/2 "2019-07-08T03:43:54Z")

</div>

If you _always_ want to start with a maximized browser, you should handle this with a desired capability. That way you don’t have to call WebUI.maximizeWindow() in every single script. This is how to do it for chrome:

1.) Open Project \> Settings \> Desired Capabilities \> WebUI \> Chrome:

 ![image](https://europe1.discourse-cdn.com/katalon/original/2X/5/5ac03eef7a9cc0bafeb9a76b078ad639765276c9.png)

2.) Click “Add”, and set Name to “args”, Type to “List”, then click on the ellipses:

 ![image](https://europe1.discourse-cdn.com/katalon/original/2X/9/9649ac8038d4c5be2058ba1fa5f6c31fd4e5405d.png)

3.) In the list property builder, set Value to “–start-maximized”:

 ![image](https://europe1.discourse-cdn.com/katalon/original/2X/5/50ef76cfab5f0e03e9478901f59dbd1957f723ed.png)

4.) Apply all your settings and run your script.

---

<div class="post-metadata">

**Author:** ![manpreet.mukkar](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/manpreet.mukkar/32/16103_2.png) [@manpreet.mukkar](https://forum.katalon.com/u/manpreet.mukkar)\
**Post date:** [July 8, 2019, 5:52pm UTC](https://forum.katalon.com/t/how-do-i-maximize-browser-while-running-katalon-script-through-jenkins/29255/3 "2019-07-08T17:52:54Z")

</div>

@Brandon_Hein Thanks for sharing this. I have another question. I want to enable my scripts to work on Mobile, Tab and Desktop. The state in which they are currently in work well on desktop but they fail when I run on Mobile or Tablet device. The reason is that some of the elements I am interacting within the script show up on the desktop view but not on the Mobile View or Tablet View. I was wondering if I can do something like if statement that basically verifies if the screen size is this then do this or if there is another way I can do the same?

---

<div class="post-metadata">

**Author:** ![Brandon\_Hein](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/brandon_hein/32/1092_2.png) [@Brandon\_Hein](https://forum.katalon.com/u/Brandon_Hein)\
**Post date:** [July 8, 2019, 7:11pm UTC](https://forum.katalon.com/t/how-do-i-maximize-browser-while-running-katalon-script-through-jenkins/29255/4 "2019-07-08T19:11:40Z")

</div>

Mobile testing is outside of my skillset. I know that @Chris_Trevarthen knows more about that type of testing.

---

<div class="post-metadata">

**Author:** ![Amanda\_Perkins1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/amanda_perkins1/32/3843_2.png) [@Amanda\_Perkins1](https://forum.katalon.com/u/Amanda_Perkins1)\
**Post date:** [July 8, 2019, 7:15pm UTC](https://forum.katalon.com/t/how-do-i-maximize-browser-while-running-katalon-script-through-jenkins/29255/5 "2019-07-08T19:15:45Z")

</div>

I wouldn’t see why not. I use if statements for environments, so I would assume that you could use the get viewport width/height webUI keyword and then form your if statement there. But, be careful, because sometimes clicks, etc are different so you’ll want to use a mobileUI keyword in those cases.

---

<div class="post-metadata">

**Author:** ![manpreet.mukkar](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/manpreet.mukkar/32/16103_2.png) [@manpreet.mukkar](https://forum.katalon.com/u/manpreet.mukkar)\
**Post date:** [July 8, 2019, 7:23pm UTC](https://forum.katalon.com/t/how-do-i-maximize-browser-while-running-katalon-script-through-jenkins/29255/6 "2019-07-08T19:23:14Z")

</div>

@Amanda_Perkins1 Thanks, I just want to run the scripts on Mobile Browser. Do I need MobileUI Keywords there as well ?

---

<div class="post-metadata">

**Author:** ![Amanda\_Perkins1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/amanda_perkins1/32/3843_2.png) [@Amanda\_Perkins1](https://forum.katalon.com/u/Amanda_Perkins1)\
**Post date:** [July 8, 2019, 7:26pm UTC](https://forum.katalon.com/t/how-do-i-maximize-browser-while-running-katalon-script-through-jenkins/29255/7 "2019-07-08T19:26:12Z")

</div>

Possibly, since mobile browsers are still responsive to touch rather than mouse click. You could definitely try it out and see and then adjust as necessary. I know with our mobile app we have to use the mobileUI keywords, I’ve not tried it with mobile browsers at this point. Let me know what you find out!!

---

<div class="post-metadata">

**Author:** ![manpreet.mukkar](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/manpreet.mukkar/32/16103_2.png) [@manpreet.mukkar](https://forum.katalon.com/u/manpreet.mukkar)\
**Post date:** [July 8, 2019, 7:28pm UTC](https://forum.katalon.com/t/how-do-i-maximize-browser-while-running-katalon-script-through-jenkins/29255/8 "2019-07-08T19:28:01Z")

</div>

@Amanda_Perkins1 Sure I will update here, Getting scripts working across all type of user devices is my next project.

---

<div class="post-metadata">

**Author:** ![albert.vu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/albert.vu/32/20595_2.png) [@albert.vu](https://forum.katalon.com/u/albert.vu)\
**Post date:** [August 8, 2022, 7:43am UTC](https://forum.katalon.com/t/how-do-i-maximize-browser-while-running-katalon-script-through-jenkins/29255/9 "2022-08-08T07:43:28Z")

</div>

Archived on August 8, 2022, 7:43am UTC


