title: How to switch between windows in selenium?
body: <p>I am working on a application which is desired for IE only. Once after login into application a new new window is opened which is the home page. Now my issue is I am not able to locate any element in homepage through IE driver.
  Not sure if the browser is looking for the element in previous window.</p>
  
  <p>My method:</p>
  
  <pre><code>public void awb_enquiry() throws Exception {
  
      String handles= driver.getWindowHandle();
      System.out.println(handles);
      driver.switchTo().window(handles);
      driver.findElement(By.xpath("//*[text()='Select']")).click();
  }
  </code></pre>