{"action":"opened","issue":{"url":"https://api.github.com/repos/electron/spectron/issues/142","repository_url":"https://api.github.com/repos/electron/spectron","labels_url":"https://api.github.com/repos/electron/spectron/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/electron/spectron/issues/142/comments","events_url":"https://api.github.com/repos/electron/spectron/issues/142/events","html_url":"https://github.com/electron/spectron/issues/142","id":189583956,"number":142,"title":"Default Spectron Code terminates with errors","user":{"login":"Bharadwaj108","id":21349904,"avatar_url":"https://avatars.githubusercontent.com/u/21349904?v=3","gravatar_id":"","url":"https://api.github.com/users/Bharadwaj108","html_url":"https://github.com/Bharadwaj108","followers_url":"https://api.github.com/users/Bharadwaj108/followers","following_url":"https://api.github.com/users/Bharadwaj108/following{/other_user}","gists_url":"https://api.github.com/users/Bharadwaj108/gists{/gist_id}","starred_url":"https://api.github.com/users/Bharadwaj108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bharadwaj108/subscriptions","organizations_url":"https://api.github.com/users/Bharadwaj108/orgs","repos_url":"https://api.github.com/users/Bharadwaj108/repos","events_url":"https://api.github.com/users/Bharadwaj108/events{/privacy}","received_events_url":"https://api.github.com/users/Bharadwaj108/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-16T04:23:12Z","updated_at":"2016-11-16T04:23:12Z","closed_at":null,"body":"Hello everyone,\r\nI have copies and pasted the the code from [https://github.com/electron/spectron](url) and replaced the path of my electron executable. The code starts my electron application and terminates immediately and logs errors. this is **my code**\r\n```\r\nvar assert = require('assert');\r\nvar Application = require('spectron').Application\r\ndescribe('Test Suite 1', function () {\r\n    this.timeout(100000)\r\n    beforeEach(function () {\r\n        this.app = new Application({\r\n            path: '/CorumDispense-win32-ia32/CorumDispense.exe'\r\n        })\r\n        return this.app.start()\r\n        //this.app.start()\r\n    })\r\n    afterEach(function () {\r\n        if (this.app && this.app.isRunning()) {\r\n            return this.app.stop()            \r\n        }\r\n    })\r\n    it('Start Dispense', function () {\r\n        return this.app.client.getWindowCount().then(function (count) {\r\n            assert.equal(count, 1)\r\n        })        \r\n    })\r\n})\r\n```\r\n**And this is my output**\r\n\r\n```\r\nTest Name:\tTest Suite 1 Start Dispense\r\nTest Outcome:\tFailed\r\nResult StandardOutput:\t\r\nmocha.json options file not found. Using default values: { ui: 'tdd', reporter: 'tap', timeout: 2000 }\r\n1..1\r\nnot ok 1 Test Suite 1 Start Dispense\r\n  AssertionError: 2 == 1\r\n      at Object.<anonymous> (SpectronDemo.js:19:20)\r\n      at Object.exec (C:\\Bharat\\AutomationDemos\\NodeJsProject\\Lighthouse\\Lighthouse\\node_modules\\webdriverio\\build\\lib\\helpers\\safeExecute.js:28:24)\r\n      at Object.resolve (C:\\Bharat\\AutomationDemos\\NodeJsProject\\Lighthouse\\Lighthouse\\node_modules\\webdriverio\\build\\lib\\webdriverio.js:189:29)\r\n      at C:\\Bharat\\AutomationDemos\\NodeJsProject\\Lighthouse\\Lighthouse\\node_modules\\webdriverio\\build\\lib\\webdriverio.js:487:32\r\n      at _fulfilled (C:\\Bharat\\AutomationDemos\\NodeJsProject\\Lighthouse\\Lighthouse\\node_modules\\q\\q.js:834:54)\r\n      at self.promiseDispatch.done (C:\\Bharat\\AutomationDemos\\NodeJsProject\\Lighthouse\\Lighthouse\\node_modules\\q\\q.js:863:30)\r\n      at Promise.promise.promiseDispatch (C:\\Bharat\\AutomationDemos\\NodeJsProject\\Lighthouse\\Lighthouse\\node_modules\\q\\q.js:796:13)\r\n      at C:\\Bharat\\AutomationDemos\\NodeJsProject\\Lighthouse\\Lighthouse\\node_modules\\q\\q.js:604:44\r\n      at runSingle (C:\\Bharat\\AutomationDemos\\NodeJsProject\\Lighthouse\\Lighthouse\\node_modules\\q\\q.js:137:13)\r\n      at flush (C:\\Bharat\\AutomationDemos\\NodeJsProject\\Lighthouse\\Lighthouse\\node_modules\\q\\q.js:125:13)\r\n# tests 1\r\n# pass 0\r\n# fail 1\r\n```\r\n\r\nCan I please get some help here guys. Thanks in advance.\r\nRegards,\r\nBharadwaj.\r\n\r\n\r\n"}}
{"actor":{"display_login":"Bharadwaj108"}}