I\'m working with Selenium Automation. In this, When i click a link in a current window, a new window opens. I just want to switch the control to the new window. But i can\'
Set set = driver.getWindowHandles(); Iterator it = set.iterator(); String parentWindowId = it.next(); String childWindowId = it.next(); System.out.println(set); driver.switchTo().window(childWindowId);