{"action":"created","issue":{"url":"https://api.github.com/repos/appium/sample-code/issues/95","repository_url":"https://api.github.com/repos/appium/sample-code","labels_url":"https://api.github.com/repos/appium/sample-code/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/appium/sample-code/issues/95/comments","events_url":"https://api.github.com/repos/appium/sample-code/issues/95/events","html_url":"https://github.com/appium/sample-code/issues/95","id":169881477,"number":95,"title":"npm run android-simple.js does not work while mocha android-simple.js works","user":{"login":"rahulmr","id":10260232,"avatar_url":"https://avatars.githubusercontent.com/u/10260232?v=3","gravatar_id":"","url":"https://api.github.com/users/rahulmr","html_url":"https://github.com/rahulmr","followers_url":"https://api.github.com/users/rahulmr/followers","following_url":"https://api.github.com/users/rahulmr/following{/other_user}","gists_url":"https://api.github.com/users/rahulmr/gists{/gist_id}","starred_url":"https://api.github.com/users/rahulmr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahulmr/subscriptions","organizations_url":"https://api.github.com/users/rahulmr/orgs","repos_url":"https://api.github.com/users/rahulmr/repos","events_url":"https://api.github.com/users/rahulmr/events{/privacy}","received_events_url":"https://api.github.com/users/rahulmr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-08T09:37:30Z","updated_at":"2016-08-08T15:13:27Z","closed_at":null,"body":"Hello, \r\nI am getting issue with running the examples for nodejs.\r\n`npm run android-simple.js` does not work while `mocha android-simple.js `works fine.\r\n\r\n**Not working** \r\n```\r\nrahul.raut1@mywindows MINGW64 /d/projects/automation/sample-code/sample-code/examples/node (master)\r\n$ npm run android-simple.js\r\nnpm ERR! Windows_NT 6.1.7601\r\nnpm ERR! argv \"D:\\\\nodejs\\\\node.exe\" \"D:\\\\nodejs\\\\node_modules\\\\npm\\\\bin\\\\npm-cli.js\" \"run\" \"android-simple.js\"\r\nnpm ERR! node v6.2.2\r\nnpm ERR! npm  v3.10.5\r\n\r\nnpm ERR! missing script: android-simple.js\r\nnpm ERR!\r\nnpm ERR! If you need help, you may report this error at:\r\nnpm ERR!     <https://github.com/npm/npm/issues>\r\n\r\nnpm ERR! Please include the following file with any support request:\r\nnpm ERR!     D:\\projects\\automation\\sample-code\\sample-code\\examples\\node\\npm-debug.log\r\n\r\nrahul.raut1@mywindows MINGW64 /d/projects/automation/sample-code/sample-code/examples/node (master)\r\n\r\n```\r\n\r\n**Working** \r\n\r\n```\r\nrahul.raut1@mywindows MINGW64 /d/projects/automation/sample-code/sample-code/examples/node (master)\r\n$ mocha android-simple.js\r\n\r\n\r\n  android simple\r\n > CALL init({\"browserName\":\"\",\"appium-version\":\"1.5.3\",\"platformName\":\"Android\",\"platformVersion\":\"5.1\",\"deviceName\":\"160530023779\",\"app\":\"http://appium.github.io/appium/assets/ApiDemos-debug.apk\"})\r\n > POST /session {\"desiredCapabilities\":{\"browserName\":\"\",\"appium-version\":\"1.5.3\",\"platformName\":\"Android\",\"platformVersion\":\"5.1\",\"deviceName\":\"160530023779\",\"app\":\"http://appium.github.io/appium/assets/ApiDemos-debug.apk\"}}\r\n\r\nDriving the web on session: deba8719-5414-4fad-89a4-62cdcc2125a8\r\n\r\n > RESPONSE init({\"browserName\":\"\",\"appium-version\":\"1.5.3\",\"platformName\":\"Android\",\"platformVersion\":\"5.1\",\"deviceName\":\"160530023779\",\"app\":\"http://appium.github.io/appium/assets/ApiDemos-debug.apk\"}) \"deba8719-5414-4fad-89a4-62cdcc2125a8\",{\"platform\":\"LINUX\",\"webStorageEnabled\":false,\"takesScreenshot\":true,\"javascriptEnabled\":true,\"databaseEnabled\":false,\"networkConnectionEnabled\":true,\"locationContextEnabled\":false,\"warnings\":{},\"desired\":{\"browserName\":\"\",\"appium-version\":\"1.5.3\",\"platformName\":\"Android\",\"platformVersion\":\"5.1\",\"deviceName\":\"160530023779\",\"app\":\"http://appium.github.io/appium/assets/ApiDemos-debug.apk\"},\"browserName\":\"\",\"appium-version\":\"1.5.3\",\"platformName\":\"Android\",\"platformVersion\":\"5.1\",\"deviceName\":\"160530023779\",\"app\":\"http://appium.github.io/appium/assets/ApiDemos-debug.apk\",\"deviceUDID\":\"160530023779\",\"appPackage\":\"io.appium.android.apis\",\"appWaitPackage\":\"io.appium.android.apis\",\"appActivity\":\"io.appium.android.apis.ApiDemos\",\"appWaitActivity\":\"io.appium.android.apis.ApiDemos\"}\r\n > CALL setImplicitWaitTimeout(3000)\r\n > POST /session/:sessionID/timeouts/implicit_wait {\"ms\":3000}\r\n > RESPONSE setImplicitWaitTimeout(3000)\r\n > CALL elementByAccessibilityId(\"Graphics\")\r\n > POST /session/:sessionID/element {\"using\":\"accessibility id\",\"value\":\"Graphics\"}\r\n    √ should find an element (80ms)\r\n > CALL quit()\r\n > DELETE /session/:sessionID\r\n\r\nEnding your web drivage..\r\n\r\n > RESPONSE quit()\r\n\r\n\r\n  1 passing (24s)\r\n\r\n\r\nrahul.raut1@mywindows MINGW64 /d/projects/automation/sample-code/sample-code/examples/node (master)\r\n\r\n```\r\n\r\nIs it possible to improve the documentation or is it something I am missing out?\r\n\r\nThanks for help and support.\r\n"},"comment":{"url":"https://api.github.com/repos/appium/sample-code/issues/comments/238268903","html_url":"https://github.com/appium/sample-code/issues/95#issuecomment-238268903","issue_url":"https://api.github.com/repos/appium/sample-code/issues/95","id":238268903,"user":{"login":"imurchie","id":2614354,"avatar_url":"https://avatars.githubusercontent.com/u/2614354?v=3","gravatar_id":"","url":"https://api.github.com/users/imurchie","html_url":"https://github.com/imurchie","followers_url":"https://api.github.com/users/imurchie/followers","following_url":"https://api.github.com/users/imurchie/following{/other_user}","gists_url":"https://api.github.com/users/imurchie/gists{/gist_id}","starred_url":"https://api.github.com/users/imurchie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imurchie/subscriptions","organizations_url":"https://api.github.com/users/imurchie/orgs","repos_url":"https://api.github.com/users/imurchie/repos","events_url":"https://api.github.com/users/imurchie/events{/privacy}","received_events_url":"https://api.github.com/users/imurchie/received_events","type":"User","site_admin":false},"created_at":"2016-08-08T15:13:27Z","updated_at":"2016-08-08T15:13:27Z","body":"Where are you running the npm command? It has to be run in the directory with the node sample code. Mocha will search sub-directories, but the npm command will not."}}
{"actor":{"display_login":"imurchie"}}