I use selenium 2 and the browser version is IE 11. I face issue while handling with pop up.
Scenario 1:
driver.findElement(By.id("I create modal window")).click();
Set<String> windows = driver.getWindowHandles();
System.out.println(windows.size());
I get the output as 2.
Scenario: 2 (with the same concept)
driver.findElement(By.id("I create pop up")).click();
Set<String> windows = driver.getWindowHandles();
System.out.println(windows.size());
I get the output as 1.
I could not switch to the pop-up. Some times the pop-up response like not connected and moreover the size of the popup is way smaller than what it should be.
What would be the problem
Note : The element id's are not real one