I am unable to navigate into a new window, as it is showing the same window for both parent and child. I use this code. What is the problem?
String parent_Window = driver.getWindowHandle();
Set<String> handles = driver.getWindowHandles();
for(String window_Handle : handles){
if(!window_Handle.equals(parent_Window)){
driver.switchTo().window(window_Handle);
//<!--Perform operation here for new window-->
driver.switchTo().window(parent_Window);
}
}