ChromeDriver not honoring the --window-size parameter.

374 views
Skip to first unread message

Narendra Reddy

unread,
May 28, 2025, 8:47:21 AMMay 28
to ChromeDriver Users
Hi Team,

We are using python selenium BDD framework. We recently upgraded chrome driver and chome browser to 137.0.7151.55, from then we see chrome driver is not honoring the --window-size parameter.

We have tried below code:
driver.maximize_window()
options.add_argument('--window-size=1920x1080');
options.add_argument('--start-maximized')

Though we added above lines of code under options class we see window is opening with tablet size. Any one also seeing the issue, if yes please suggest us the solution for this.

Regards,
Narendra

Benyamin Jameeimoghadam

unread,
Jun 11, 2025, 11:24:21 AMJun 11
to ChromeDriver Users
Hello Narendra,

I am also facing the same issue. As soon as I run my tests in headless mode the window_size is set to width 800 and height 600.

Regards,
Benyamin

Naman Vijayvargiya

unread,
Jun 12, 2025, 2:13:21 AMJun 12
to ChromeDriver Users

Hi All,
Has anyone found any workaround for this ? 

Narendra Reddy

unread,
Jun 12, 2025, 2:44:27 AMJun 12
to Naman Vijayvargiya, ChromeDriver Users
Hello Everyone,

By adding "driver.set_window_size(1920, 1080)" resolved my issue.

Regards,
Narendra Kudumula

--
You received this message because you are subscribed to a topic in the Google Groups "ChromeDriver Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/chromedriver-users/Y7wkiRnKEco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/chromedriver-users/3f2df34c-8b2c-4fd1-9841-c57624209793n%40googlegroups.com.

Naman Vijayvargiya

unread,
Jun 12, 2025, 2:55:29 AMJun 12
to ChromeDriver Users
Thanks for the reply, but strangely this does not work for me.
I am using Robot framework with selenium which has `Set Window Size` function which I believe does the same job and still my windows size is not correct.

Thanks
Naman

Benyamin Jameeimoghadam

unread,
Jun 12, 2025, 4:22:38 AMJun 12
to ChromeDriver Users
I am not sure if it is just Chrome issue as I encounter the same problem when I am running tests in headless mode and browser size is by default set to (1313x738). 
I tried to find a work around by just setting it to  driver.set_window_size(1920, 1080) but some elements can be undetectable due to size issue. 

Regards,
Ben

Naman Vijayvargiya

unread,
Jun 12, 2025, 7:02:30 AMJun 12
to ChromeDriver Users
Hi Ben
I have only recently started seeing this issue, prior to this the browser window was getting maximized so that led me to believe this could be a chromedriver update issue.

Thanks

Mr. Yoso

unread,
Jun 13, 2025, 5:08:37 AMJun 13
to ChromeDriver Users
Hello,

Good day.

I'm experiencing the same. I'm using an Ubuntu as runner for my robotframework selenium tests.

Aditi Ks

unread,
Jun 19, 2025, 10:52:12 AMJun 19
to ChromeDriver Users
I have tried the resolution given above it did not work , any other solutions for this?
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages