Resizing and Positioning Window - Codoid
Select Page
Codoid Blog

Resizing and Positioning Window

Irrespective of the business that your client is in, marketing is an integral part of their operations. In fact, in this day and age of social.

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
  

Written By

Submit a Comment

Your email address will not be published. Required fields are marked *


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