Saturday, August 25, 2012

How to switch from one window to another window in Selenium Webdriver

 

Sometimes we need to switch from one window to another window in our automation. Selenium webdriver has given us a nice command.

driver.switchTo().window(destination window);



Here argument is the title of the window. I found it very successful.


For example, if title of the window is “Olympic”, then command will be in Java,

driver.switchTo().window("Olympic"); 

We can get the title of the window by using firebug. 

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

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...