| || |
handling popup window
I tried handle the popup with using below snippet
String parentWindowName= driver.getWindowHandle();
driver.findElement(By.id("popUpConv")).click(); ///this line opens new child window
String childWindowName= driver.getWindowHandle();
////Here its not moving the focus to child window
I tried googling, but everyone suggests getWindowHandles(); method, but i know only one child window is there then still is it required to use this method instead of getWindowHandle() ?
I am using webdriver with Java
Thanks & Regards,
Last edited by Chowdary287; 04-11-2014 at 12:34 AM.
Got the solution..If we know the child window name then we can able to drectly use below one, otherwise we have to use getWindowHandles() method