title: Selenium-Webdriver Node.js Can't Find New Window
body: <p>I'm running a selenium-webdriver javascript scraper, which logs into a site and clicks a button that launches a new tab/window. I'm trying to switch the driver to focus on the newly generated window, but Selenium cannot find it.  The code I have to look:</p>
  
  <pre><code>driver.sleep(10000).then(function() {
      driver.getAllWindowHandles().then(function(d) {
          console.log(d);
      })
  })
  </code></pre>
  
  <p>Which prints</p>
  
  <pre><code>[ '287ab61a-b155-46de-a2a6-298e0e98e440' ]
  </code></pre>
  
  <p>Which is the original browser window. What could cause Selenium to not pick up on the new window?</p>