title: how to close selenium webdriver at end of test?
body: <p>I have created a e2e test for my angular app. I would like to close down the selenium webdriver at the end of the test:</p>
  
  <pre><code>describe('Selenium end', function () {
      it("close down selenium server", function () {
          browser.get('http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer');
          var text = element(by.css('pre')).getText(function (text) {
              expect(text).toEqual('OKOK');
          });
      });
  });
  </code></pre>
  
  <p>When I run this i get:</p>
  
  <pre><code> Message:     Error: Error while running testForAngular: ECONNREFUSED connect ECONNREFUSED
  </code></pre>
  
  <p>How can I stop the selenium webdriver or assert it is closed based on the info above?</p>