We are facing issue in switching to the new window on safari browser. Below is our code used for switching the window.
public void switchToWindow() {
Set<String> availableWindows = driver.getWindowHandles();
for (String strWinHandle : availableWindows) {
driver.switchTo().window(strWinHandle);
}
}
In availableWindows, it returns all window handles but instead of switching to new window, it is switching to parent window. Above code works fine on all other browsers.
Selenium version - 3.11.0 Safari version - 11.1.1