I came across many solutions for switching between windows, one of them is:
Set<String> allWindows = driver.getWindowHandles();
for(String currentWindow : allWindows){
driver.switchTo().window(currentWindow);
}
But, I am unable to go to a particular window. Can someone tell me how to switch to 3rd window from parent window (using java client library)?