{"action":"created","issue":{"url":"https://api.github.com/repos/RobotiumTech/robotium/issues/727","labels_url":"https://api.github.com/repos/RobotiumTech/robotium/issues/727/labels{/name}","comments_url":"https://api.github.com/repos/RobotiumTech/robotium/issues/727/comments","events_url":"https://api.github.com/repos/RobotiumTech/robotium/issues/727/events","html_url":"https://github.com/RobotiumTech/robotium/issues/727","id":102154317,"number":727,"title":"waitForActivity return false on robotium 5.2.1","user":{"login":"renas","id":165541,"avatar_url":"https://avatars.githubusercontent.com/u/165541?v=3","gravatar_id":"","url":"https://api.github.com/users/renas","html_url":"https://github.com/renas","followers_url":"https://api.github.com/users/renas/followers","following_url":"https://api.github.com/users/renas/following{/other_user}","gists_url":"https://api.github.com/users/renas/gists{/gist_id}","starred_url":"https://api.github.com/users/renas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renas/subscriptions","organizations_url":"https://api.github.com/users/renas/orgs","repos_url":"https://api.github.com/users/renas/repos","events_url":"https://api.github.com/users/renas/events{/privacy}","received_events_url":"https://api.github.com/users/renas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RobotiumTech/robotium/labels/bug","name":"bug","color":"FFFFFF"},{"url":"https://api.github.com/repos/RobotiumTech/robotium/labels/imported","name":"imported","color":"FFFFFF"},{"url":"https://api.github.com/repos/RobotiumTech/robotium/labels/invalid","name":"invalid","color":"FFFFFF"},{"url":"https://api.github.com/repos/RobotiumTech/robotium/labels/Priority-Medium","name":"Priority-Medium","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-20T14:39:02Z","updated_at":"2015-08-20T14:39:15Z","closed_at":null,"body":"_From [lina_b...@163.com](https://code.google.com/u/113633133478904289990/) on January 04, 2015 02:27:00_\n\nWhat steps will reproduce the problem? 1.launch one activity\r\n2.do some action\r\n3.waitForActivity return false What is the expected output? What do you see instead? waitForActivity return true if another activity shows on screen. What version of the product are you using? On what operating system? robotium 5.2.1,android 4.4 Please provide any additional information below. protected void setUp() throws Exception {\r\n\t\tsuper.setUp();\r\n\t\tIntent i = new Intent();\r\n\t\ti.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\tsetActivityIntent(i);\r\n\t\tsolo = new Solo(getInstrumentation());\r\n\t\tgetActivity();\r\n\t}\r\npublic void testCapture() {\r\n\t\t\t//solo.assertCurrentActivity(\"current activity is not CameraActivity\", CameraActivity.class);\r\n\r\n\t\t\tActivity act=solo.getCurrentActivity();\r\n\t\t\tassertTrue(act.getClass().getName().equals(\"com.android.camera.CameraActivity\")); \r\n\t\t\t\r\n\t\t\tint id=act.getResources().getIdentifier(\"shutter_button\", \"id\", act.getPackageName());//通过String的id获取int的id\r\n\t\t\tImageView shutterButton=(ImageView)act.findViewById(id);//获取View\r\n\t\t\tsolo.sleep(1000);\t\r\n\t\t    solo.clickOnView(shutterButton);\r\n\t\t    solo.sleep(1000);\r\n\t\t    //assertTrue(PhotoEditor.class.getName().equals(\"com.android.s3dgallery3d.photoeditor.PhotoEditor\")); \r\n\t\t    //ActivityMonitor imageActivityMonitor = this.getInstrumentation().addMonitor(PhotoEditor.class.getName(), null, false);\r\n\t\t\tsolo.clickOnView(shutterButton);\r\n\t\t\tsolo.sleep(1000);\r\n\r\n\t\t\tsolo.waitForActivity(PhotoEditor.class.getName(),3000);\r\n\t        solo.assertCurrentActivity(\"Failure to start PhotoEditorActivity\", PhotoEditor.class);\r\n}\r\nPhotoEditor and CameraActivity in the same process, i can find it in androidmanifest.xml\r\nmanifest xmlns:android=\" http://schemas.android.com/apk/res/android \"\r\n    package=\"com.superd.camera3d\"\r\n\\<activity\r\n            android:name=\"com.android.camera.CameraActivity\"\r\n            android:clearTaskOnLaunch=\"true\"\r\n\\<activity android:name=\"com.android.s3dgallery3d.photoeditor.PhotoEditor\"\n\n_Original issue: http://code.google.com/p/robotium/issues/detail?id=648_"},"comment":{"url":"https://api.github.com/repos/RobotiumTech/robotium/issues/comments/133034054","html_url":"https://github.com/RobotiumTech/robotium/issues/727#issuecomment-133034054","issue_url":"https://api.github.com/repos/RobotiumTech/robotium/issues/727","id":133034054,"user":{"login":"renas","id":165541,"avatar_url":"https://avatars.githubusercontent.com/u/165541?v=3","gravatar_id":"","url":"https://api.github.com/users/renas","html_url":"https://github.com/renas","followers_url":"https://api.github.com/users/renas/followers","following_url":"https://api.github.com/users/renas/following{/other_user}","gists_url":"https://api.github.com/users/renas/gists{/gist_id}","starred_url":"https://api.github.com/users/renas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renas/subscriptions","organizations_url":"https://api.github.com/users/renas/orgs","repos_url":"https://api.github.com/users/renas/repos","events_url":"https://api.github.com/users/renas/events{/privacy}","received_events_url":"https://api.github.com/users/renas/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T14:39:15Z","updated_at":"2015-08-20T14:39:15Z","body":"_From [lina_b...@163.com](https://code.google.com/u/113633133478904289990/) on January 05, 2015 01:40:38_\n\nHi renas\n\nI found the root cause, in manifest.xml file of app source code,\n\\<activity\n            android:name=\"com.android.camera.CameraActivity\"\n            android:clearTaskOnLaunch=\"true\"\n            android:configChanges=\"orientation|screenSize|keyboardHidden\"\n            android:icon=\"@mipmap/ic_launcher_camera\"\n            \\>\n \\<activity android:name=\"com.android.s3dgallery3d.photoeditor.PhotoEditor\"\n                android:label=\"@string/app_name\"\n                android:process=\":edit\">\n\nSo,they are in the different process.\nDo you have resolved this type of problem ?\nMany thanks.\n\nBr,\nNa\n\n\n\n\n\n\n\n\nAt 2015-01-04 20:41:02, robotium@googlecode.com wrote: >Updates: > Owner: renasr...@gmail.com > >Comment `#1` on issue #648 by renasr...@gmail.com: waitForActivity return >false on robotium 5.2.1 > https://code.google.com/p/robotium/issues/detail?id=648 > >Thanks for reporting this. Would it be possible for you to share an app >that exhibits this issue? You can email it to renasreda@gmail.com > >-- >You received this message because you starred the issue. >You may adjust your notification preferences at: > https://code.google.com/hosting/settings > >Reply to this email to add a comment."}}