John Stennett
John Stennett

Reputation: 546

Google Chrome window resizing limitation

We have an open bug in our Automation Testing Framework regarding the resizing limitations of a Chrome Window when it is controlled by Selenium + ChromeDriver and I need help since I can't track down an official answer. As far as I am aware this was not an issue in the past.

We currently use the framework Codeception as the base for our own framework and when we use the action resizeWindow with the dimensions 320x568 it resizes the window to 445x500. Has anyone else ran into this issue with Chrome? It looks like a hardcoded limit at this point. Any advice would be greatly appreciated. Below I've provided a few Tests that I've ran looking for the upper and lower limits of the resizing action.

Test #1

Test #2

Test 3

LINKS

Upvotes: 3

Views: 1772

Answers (3)

J A.
J A.

Reputation: 1346

Try using firefox. It works great. since chrome's setting changed and it won't work for testing media queries unless you use the dev tools.

Upvotes: 0

John Stennett
John Stennett

Reputation: 546

I found an answer to my question in another StackOverflow question.

"Chrome cannot resize horizontally below 400px (OS X) or 218px (Windows)"

Browser doesn't scale below 400px?

Upvotes: 2

Santhanaprabha
Santhanaprabha

Reputation: 11

Can you please try with selenium dimension import

Import : import org.openqa.selenium.Dimension;

code :

    Dimension d = new Dimension(320,568);

    driver.manage().window().setSize(d); //Resize current window to the set dimension

Upvotes: 1

Related Questions