Thursday, July 3, 2014

Selenium WebDriver Handling child Windows




//Getting the existing windows handle incase we need to get back to the window.
String winHandleBefore = driver.getWindowHandle();

//Perform the click operation that opens new window
//Switch to new window opened
for(String winHandle : driver.getWindowHandles()){
driver.switchTo().window(winHandle);
}
driver.switchTo().defaultContent();
  

 Switch To frame :
 
driver.switchTo().frame("studioFrame"); 

No comments:

Post a Comment