1

We are using Jenkins version 2.14 for our Test Automation regression.

we are running it as a stand alone with no slaves.

We have configured a task scheduler which starts jenkins at a predefined time and executes scripts.

Because its executed as service, the chrome browser opens with small screen resolution and our scripts fail.

this issue doesnt occur when we run Jenkins through command line.

Can you please tell how to over come this issue

2

You could try to change the window size before running the tests, just be sure not to maximize the window as it will lock it in the max screen resolution, but browsers windows can be outside of the viewable area of the desktop it runs on:

driver.manage().window().setSize(new Dimension(1280,1024));

Alternatively you could try to change the window sizes with browser startup arguments:

 ChromeOptions options = new ChromeOptions();
 options.addArguments("window-size=1280,1024");

Hardlocking the virtual machine window size might also work. This question suggest to log in with the systems account and change the resolution. Others note to login with RDP and change the resolution.

Code samples provided are just examples for Selenium and Java, be sure to check the documentation for your programming language and automation tool.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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