diff --git a/lib/runner.ts b/lib/runner.ts index eee47b4c2..37a93ab37 100644 --- a/lib/runner.ts +++ b/lib/runner.ts @@ -257,6 +257,11 @@ export class Runner extends EventEmitter { this.setupGlobals_(browser_); }; + browser_.quit = + () => { + this.driverprovider_.quitDriver(browser_.driver); + } + return browser_; } diff --git a/scripts/attachSession.js b/scripts/attachSession.js index ebd3c0ca6..9e195fb85 100644 --- a/scripts/attachSession.js +++ b/scripts/attachSession.js @@ -9,7 +9,7 @@ var sessionId = ''; // 1. Create a new selenium session. var postData = JSON.stringify( - {'desiredCapabilities': {'browserName': 'chrome'}}); + {'desiredCapabilities': {'browserName': 'firefox'}}); var createOptions = { hostname: 'localhost', port: 4444, diff --git a/spec/interaction/interaction_spec.js b/spec/interaction/interaction_spec.js index becfe3bdd..36438b5c3 100644 --- a/spec/interaction/interaction_spec.js +++ b/spec/interaction/interaction_spec.js @@ -11,9 +11,8 @@ describe('Browser', function() { // throughout all of your tests). However, I'm forking browsers in my tests // and don't want to pile up my browser count. if (newBrowser) { - newBrowser.quit().then(function() { - done(); - }); + newBrowser.quit(); + done(); } else { done(); }