title: selenium: is the first window handle always the main window?
body: <p>Is the first window guaranteed to be the main window? Or is the order random and inconsistent?</p>
  
  <pre><code>for (String handle : driver.getWindowHandles()) {
      driver.switchTo().window(handle);
  }
  </code></pre>
  
  <p>I can't find any information about the order of the window handles, just a way to iterate thorugh them all. I am assuming that the first in the list of window handles is going to be the main window.</p>