We are in the process of setting up Jenkins for our testing projects and we are facing a huge challenge for browser window size. The app we are testing is a Progressing app so with the default screen size of Jenkins hides the menu element and we need to jump through hoops and probably will need to add some if then else conditions if we want to use Jenkins as the CI tool. The test scripts are built using Protractor - Jasmine. In my research I saw some solutions offered for this problem but they are for Java , and I could not find any solution for protractor based tests. Is there any way to maximize the browser window size when running Protractor tests in Jenkins?

2 Answers 2


You can use your config.js to set window size:

     // config.js 
    specs: [ ... ], 
      browserName: 'chrome',
        args: ['--window-size=800,600'] 

Source: https://stackoverflow.com/questions/20023567/how-to-set-default-browser-window-size-in-protractor-webdriverjs


Actually, the answer is to run Jenkins as a Java app ($ java -jar jenkins.war) instead of running it as a windows service. If jenkins run as a Java app, the browser window gets maximized without any problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.