Browser window resizing and positioning can be done easily using Selenium WebDriver. Consider we have opened multiple browser windows in same machine for parallel execution; it is very useful to view execution on each window, if it is positioned and re-sized for user view at run-time.
Window Resize
driver.manage().window().setSize(new Dimension(100,100)); //Note: Dimension should be imported using org.openqa.selenium.Dimension
Window Position
driver.manage().window().setPosition(new Point(100,100)); //Note: Point should be imported using org.openqa.selenium.Point
Comments(0)