Window size is changed with docker agent


We are using the window size as 1280*720 in our test scripts. Tests are running properly with local / my agent. When I run them in docker agents, window size is getting changed (Looks like it is maximizing the window size), due to which the test scripts are failing. If I add a step to increase the window size, then it is failing with local agent. Could you please let me know, is there a way to normalize this irrespective of the agents.

Thanks in advance.

Hi @sandhya.ummareddy Try to execute your test in headless mode with your local agent and let me know if it works.

Yes @ran.ferdinaro, test is working properly in headless mode with my local agent.

@sandhya.ummareddy What is the error you are receiving?
Also, please try to use this capabilities:

"goog:chromeOptions": {
    "args": [


With local agent, screen is displayed as above and Agreement field position is considered as Row 3.

With Docker agent, screen is maximized and displayed as above. In this case Agreement field position is considered as Row 4.

Hence, this test is not stable with both the agents.

Looking forward to quick resolution.

Thanks in advance.

Have you tried the ‘execute javascript’ action?
You can try it with this code;

I have tried with above JavaScript code and still it is not working. I have placed this code just before the required step. Is it fine? Pls provide the solution.

Please try this solution:

If it doesn’t work, try to maximize your screen and adapt your test to the different screen size.

Hi @ran.ferdinaro ,

I have tried with all the variations. Problem here is these are not same in different modes. Like robot operations is worked in debug mode but not in headless. Screen size is working in docker mode but not in debug mode. So there is no particular way to stable this in all different modes. Please let me know, if you have any other way to do it.

Have you tried to manually change the screen size in debug mode?


I have added the set window size action and it is not working in debug mode (may be because of my laptop resolution). I have tried pressing CTRL+’-’ manually in debug mode. It worked properly. But if we have added that action and run it in browser mode or headless mode with my agent then it is not zoomed out.

I wanted you to try and manually change your screen resolution so you can adapt your test to the Docker agent.