Maximizing windows in webdriver
//Include this package in your script.
import java.awt.Toolkit;
//Add this snippet to your code.
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension screenResolution = new Dimension((int)toolkit.getScreenSize().getWidth(),(int)toolkit.getScreenSize().getHeight());
driver.manage().window().setSize(screenResolution);
//Include this package in your script.
import java.awt.Toolkit;
//Add this snippet to your code.
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension screenResolution = new Dimension((int)toolkit.getScreenSize().getWidth(),(int)toolkit.getScreenSize().getHeight());
driver.manage().window().setSize(screenResolution);
No comments:
Post a Comment