Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

selenium webdriver how to resize browser window size for responsive design?

Solved 1 Answers 65 Views Test Automation
0 1
I creating selenium scripts for mobile devices. Our site shows responsiveness based on screen size. I want to develop my script on desktop browser first. I need to resize browser window to get responsive design. How do I resize my browser window?

1 Answer

Best answer

You can get a reference to the current window with driver.manage().window(). And the window has a setSize() method, so you could try

Dimension dimension = new Dimension(800, 600);


answered by (151 points)
selected by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.