Saturday, August 25, 2012

How to maximize Browser window in Selenium Webdriver

 

Sometimes we need to maximize our browser window at the time of automation. Selenium webdriver have given us a nice command to execute such instruction.

We have a webdriver object named “driver” and we need to make our browser window maximize. The command will be

driver.manage().window().maximize(); //Java code