title: Protractor running tests on PhantomJS
body: <p>I can't seem to get PhantomJS through a test successfully. I tried to integrate it into my project, but after that failed I tried to just run the basic Angular Docs samples and I'm getting the same issue. My steps so far:</p>
  
  <ul>
  <li><code>npm install -g phantomjs</code></li>
  <li><code>phantomjs --webdriver=9515</code> // ... GhostDriver - Main - running on port 9515</li>
  <li><code>protractor protractorConf.js</code></li>
  </ul>
  
  <p>This is the same file from the example with only browserName, and seleniumAddress port changed:</p>
  
  <pre><code>// An example configuration file.
  exports.config = {
    // The address of a running selenium server.
    seleniumAddress: 'http://localhost:9515',
  
    // Capabilities to be passed to the webdriver instance.
    capabilities: {
      'browserName': 'phantomjs'
    },
  
    // Spec patterns are relative to the current working directly when
    // protractor is called.
    specs: ['onProtractorRunner.js'],
  
    // Options to be passed to Jasmine-node.
    jasmineNodeOpts: {
      showColors: true,
    }
  };
  </code></pre>
  
  <p>I get the following error message:</p>
  
  <pre><code>UnknownError: Error Message =&gt; 'Detected a page unload event; asynchronous script execution does not work across page loads.'
  </code></pre>
  
  <p>I found <a href="https://github.com/angular/protractor/issues/85" rel="noreferrer">this issue on github</a>, which seemed to be related. I thought I had made enough sense of their <a href="https://github.com/angular/protractor/blob/master/docs/browser-setup.md#appendix-a-using-with-the-protractor-library" rel="noreferrer">brower-setup.md</a> to include it in one of my <code>beforeEach</code> functions. Then I found <a href="https://github.com/angular/protractor/issues/8" rel="noreferrer">here</a> <code>ptor</code> is just wrapping the driver anyway. Wow, I know I'm a noob here in protractor/selenium land, but the signal to noise ratio is intensively dissuasive. I'd really like to get the performance benefits of using PhantomJS, but the prospect of losing several more hours on this is hurting my head. I'm on Windows 7 Enterprise 64-bit, in case that matters. Thanks!</p>