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

4 comments:

  1. Thanks .......code works

    ReplyDelete
  2. Thanks for simple step to solve to problem

    ReplyDelete
  3. driver.manage().window().maximize();
    this is not correct java code for maximize browser..
    correct code is
    Dimension arg0 = null;
    driver.manage().window().setSize(arg0);

    ReplyDelete

Cypress: How to handle browser-based authentication pop up dialog in Cypress

Five years ago I have written a blog on how to handle browser-based authentication for selenium webdriver.   Now it is for cypress. Cypress...