{"action":"created","issue":{"url":"https://api.github.com/repos/dtmilano/AndroidViewClient/issues/171","repository_url":"https://api.github.com/repos/dtmilano/AndroidViewClient","labels_url":"https://api.github.com/repos/dtmilano/AndroidViewClient/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/dtmilano/AndroidViewClient/issues/171/comments","events_url":"https://api.github.com/repos/dtmilano/AndroidViewClient/issues/171/events","html_url":"https://github.com/dtmilano/AndroidViewClient/issues/171","id":130911170,"number":171,"title":"Generated Test could not run on actual device","user":{"login":"ace-han","id":1177332,"avatar_url":"https://avatars.githubusercontent.com/u/1177332?v=3","gravatar_id":"","url":"https://api.github.com/users/ace-han","html_url":"https://github.com/ace-han","followers_url":"https://api.github.com/users/ace-han/followers","following_url":"https://api.github.com/users/ace-han/following{/other_user}","gists_url":"https://api.github.com/users/ace-han/gists{/gist_id}","starred_url":"https://api.github.com/users/ace-han/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ace-han/subscriptions","organizations_url":"https://api.github.com/users/ace-han/orgs","repos_url":"https://api.github.com/users/ace-han/repos","events_url":"https://api.github.com/users/ace-han/events{/privacy}","received_events_url":"https://api.github.com/users/ace-han/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-03T04:48:28Z","updated_at":"2016-02-03T05:03:46Z","closed_at":null,"body":"It's okay to run the test script on emulator, but actual device. It will hang on there like forever\r\n\r\nThe device is already `USB Debug Enabled`\r\n\r\nBut get error as belows:\r\n```python\r\nsubprocess.check_call([self.adb, '-s', self.serialno, 'shell', \r\n'am', 'force-stop', 'com.dtmilano.android.culebratester'])\r\n```\r\nI don't think there is any `com.dtmilano.android.culebratester` on the actual device\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1177332/12773123/66d29a7a-ca73-11e5-84bb-7201b0a4ed4e.png)\r\n\r\nIn addition, If I comment out that `subprocess.check_call` line, I will get below error\r\n![image](https://cloud.githubusercontent.com/assets/1177332/12773221/54380ed0-ca74-11e5-9114-8b33e55fb111.png)\r\n\r\nPlease kindly help, thx.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dtmilano/AndroidViewClient/issues/comments/179011218","html_url":"https://github.com/dtmilano/AndroidViewClient/issues/171#issuecomment-179011218","issue_url":"https://api.github.com/repos/dtmilano/AndroidViewClient/issues/171","id":179011218,"user":{"login":"ace-han","id":1177332,"avatar_url":"https://avatars.githubusercontent.com/u/1177332?v=3","gravatar_id":"","url":"https://api.github.com/users/ace-han","html_url":"https://github.com/ace-han","followers_url":"https://api.github.com/users/ace-han/followers","following_url":"https://api.github.com/users/ace-han/following{/other_user}","gists_url":"https://api.github.com/users/ace-han/gists{/gist_id}","starred_url":"https://api.github.com/users/ace-han/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ace-han/subscriptions","organizations_url":"https://api.github.com/users/ace-han/orgs","repos_url":"https://api.github.com/users/ace-han/repos","events_url":"https://api.github.com/users/ace-han/events{/privacy}","received_events_url":"https://api.github.com/users/ace-han/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T05:03:46Z","updated_at":"2016-02-03T05:03:46Z","body":"My test script as below:\r\n\r\n```python\r\n#! /usr/bin/env python\r\n# -*- coding: utf-8 -*-\r\n'''\r\nCopyright (C) 2013-2014  Diego Torres Milano\r\nCreated on 2016-02-03 by Culebra v11.1.0\r\n                      __    __    __    __\r\n                     /  \\  /  \\  /  \\  /  \\ \r\n____________________/  __\\/  __\\/  __\\/  __\\_____________________________\r\n___________________/  /__/  /__/  /__/  /________________________________\r\n                   | / \\   / \\   / \\   / \\   \\___\r\n                   |/   \\_/   \\_/   \\_/   \\    o \\ \r\n                                           \\_____/--<\r\n@author: Diego Torres Milano\r\n@author: Jennifer E. Swofford (ascii art snake)\r\n'''\r\n\r\n\r\nimport re\r\nimport sys\r\nimport os\r\n\r\n\r\nimport unittest\r\n\r\nfrom com.dtmilano.android.viewclient import ViewClient, CulebraTestCase\r\n\r\nTAG = 'CULEBRA'\r\n\r\n\r\nclass CulebraTests(CulebraTestCase):\r\n\r\n    @classmethod\r\n    def setUpClass(cls):\r\n        print 'setUpClass'\r\n        cls.kwargs1 = {'ignoreversioncheck': False, 'verbose': False, 'ignoresecuredevice': False}\r\n        cls.kwargs2 = {'forceviewserveruse': False, 'useuiautomatorhelper': False, 'ignoreuiautomatorkilled': True, 'autodump': False, 'startviewserver': True, 'compresseddump': True}\r\n        cls.options = {'start-activity': None, 'concertina': False, 'device-art': None, 'use-jar': False, 'multi-device': True, 'unit-test-class': True, 'save-screenshot': None, 'use-dictionary': False, 'glare': False, 'dictionary-keys-from': 'id', 'scale': 0.5, 'find-views-with-content-description': True, 'window': -1, 'orientation-locked': None, 'save-view-screenshots': None, 'find-views-by-id': True, 'log-actions': False, 'use-regexps': False, 'null-back-end': False, 'auto-regexps': None, 'do-not-verify-screen-dump': True, 'verbose-comments': False, 'gui': True, 'find-views-with-text': True, 'prepend-to-sys-path': False, 'install-apk': None, 'drop-shadow': False, 'output': 'test.py', 'unit-test-method': None, 'interactive': False}\r\n        cls.sleep = 0\r\n\r\n    def setUp(self):\r\n        super(CulebraTests, self).setUp()\r\n\r\n    def tearDown(self):\r\n        super(CulebraTests, self).tearDown()\r\n\r\n    def preconditions(self):\r\n        if not super(CulebraTests, self).preconditions():\r\n            return False\r\n        return True\r\n\r\n    def testSomething(self):\r\n        if not self.preconditions():\r\n            self.fail('Preconditions failed')\r\n\r\n        _s = CulebraTests.sleep\r\n        _v = CulebraTests.verbose\r\n\r\n        [_vc.dump(window=-1) for _vc in self.allVcs()]\r\n        [_d.press('KEYCODE_HOME') for _d in self.allDevices()]\r\n        [_vc.findViewWithTextOrRaise(u'Sample UI v2.0').touch() for _vc in self.allVcs()]\r\n        [_vc.sleep(_s) for _vc in self.allVcs()]\r\n        [_vc.dump(window=-1) for _vc in self.allVcs()]\r\n        [_vc.findViewWithContentDescriptionOrRaise(u'''button_1''').touch() for _vc in self.allVcs()]\r\n        [_vc.sleep(_s) for _vc in self.allVcs()]\r\n        [_vc.dump(window=-1) for _vc in self.allVcs()]\r\n        [_vc.findViewWithContentDescriptionOrRaise(u'''show_dialog''').touch() for _vc in self.allVcs()]\r\n        [_vc.sleep(_s) for _vc in self.allVcs()]\r\n        [_vc.dump(window=-1) for _vc in self.allVcs()]\r\n        [_d.press('KEYCODE_1') for _d in self.allDevices()]\r\n        [_d.press('KEYCODE_2') for _d in self.allDevices()]\r\n        [_d.press('KEYCODE_3') for _d in self.allDevices()]\r\n        [_d.press('KEYCODE_4') for _d in self.allDevices()]\r\n        [_d.press('KEYCODE_5') for _d in self.allDevices()]\r\n        [_d.press('KEYCODE_6') for _d in self.allDevices()]\r\n        [_vc.findViewWithTextOrRaise(u'OK').touch() for _vc in self.allVcs()]\r\n        [_vc.sleep(_s) for _vc in self.allVcs()]\r\n        [_vc.dump(window=-1) for _vc in self.allVcs()]\r\n        [_d.press('KEYCODE_BACK') for _d in self.allDevices()]\r\n\r\n\r\nif __name__ == '__main__':\r\n    CulebraTests.main()\r\n\r\n\r\n```"}}