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:
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');
});
});
});
When I run this i get:
Message: Error: Error while running testForAngular: ECONNREFUSED connect ECONNREFUSED
How can I stop the selenium webdriver or assert it is closed based on the info above?