title: How to switch to a new pop-up window(a non-Angular app) to run Protractor?
body: <p>I am trying to check the url of a new pop-up window, and this window is from a non-Angular application. I tried the code I found from the issue board of Protractor in Github. But there is an error: </p>
  
  <pre><code>Message:
     UnknownError: null value in entry: name=null
  Stacktrace:
     UnknownError: null value in entry: name=null
  </code></pre>
  
  <p>This is my script:</p>
  
  <pre><code>var handlePromise;
  browser.ignoreSynchronization = true;
  var landingPage=require("../page-objects/landing_page.js");
  var ptor = protractor.getInstance();
  
  describe('iso1 -', function() {
      landingPage.visitISO1();
      it('Administration should not be on the menu"', function() {
          expect(element(by.xpath('//*[@id="menu"]/ul[1]/li[3]/a')).isDisplayed()).toBe(true);   
          element(by.xpath('//*[@id="menu"]/ul[1]/li[3]/a')).click();  
  
          handlePromise = browser.driver.getAllWindowHandles();
              var handles = handlePromise.then(function (handles) {
  //                parentHandle = handles[0];
                  popUpHandle = handles[1];
                  handle = browser.switchTo().window(popUpHandle);
  //                ptor.sleep(1000);
                  handle = browser.getWindowHandle();
                  expect(handle).toEqual(popUpHandle);
  //              browser.driver.executeScript('window.focus();');
  
                  var expectedUrl = browser.driver.getCurrentUrl();
                  expect(expectedUrl).toEqual('https://XXXXXXXXXXXXXXXXXXXXXXXXXXXX');
              });
          landingPage.menu.home();
      });
  });
  </code></pre>
  
  <p>Many thanks in advance.</p>