This is my code:
driver.findElement(By.id(\"ImageButton5\")).click();
//Thread.sleep(3000);
String winHandleBefore = driver.getWindowHandle();
driver.switchT
Set windows = driver.getWindowHandles();
Iterator itr = windows.iterator();
//patName will provide you parent window
String patName = itr.next();
//chldName will provide you child window
String chldName = itr.next();
//Switch to child window
driver.switchto().window(chldName);
//Do normal selenium code for performing action in child window
//To come back to parent window
driver.switchto().window(patName);