Closed GoogleCodeExporter closed 9 years ago
Thanks for reporting this. Can you provide me with a sample project that
exhibits this problem?
Original comment by renasr...@gmail.com
on 27 Apr 2012 at 7:57
Will open up when more information is given.
Original comment by renasr...@gmail.com
on 4 May 2012 at 5:30
Hi,
I am also facing the same problem with Solo.waitforactivity.
With android 2.2 it works fine and with Android 3.2 it does not work.
Thanks in advance,
Vaibhav
Original comment by vaibha...@gmail.com
on 4 May 2012 at 7:11
[deleted comment]
Hi, I am facing the same problem. I am using android 2.3.3 on emulator. The
problem is that when the 'assertTrue("Some error message",
solo.waitForActivity("Name of activity"))' is used, it always fails, even if
the activity was started. When just 'solo.waitForActivity("Name of activity")'
is used, it always passes even if the activity never existed.
Original comment by fawa...@gmail.com
on 31 Jul 2012 at 5:39
Same problem here. Seems as if the ActivityMonitor doesn't record any more hits
(at least when I peek the instance, mHits is 0).
Original comment by m...@thomaskeller.biz
on 9 Nov 2012 at 12:40
@thomaskeller, would it be possible for you to send me a sample app that
exhibits this issue?
Original comment by renasr...@gmail.com
on 12 Nov 2012 at 1:23
@Renas: Unfortunately not, the app is closed source and we're really tight on
schedule. I guess this issue is highly interconnected with issue 348. So far I
read a lot of Robotiums source code and found that I could "fix" some of the
issues by ensuring that my tests do not run too fast (e.g. I return data mocks
with a delay), since the ActivityMonitor that is used by the ActivityUtils only
checks every 50ms if the topmost activity has changed.
Now my tests run a bit more stable, but I still have problems when I try to
read out TextViews: Instead of getting the dynamic value that I set in
onCreate() I just get the original value that has been configured in the layout
xml. Of course this particular problem only pops up sometimes and also only
when the code is executed very slowly on arm-based emulators...
Original comment by m...@thomaskeller.biz
on 13 Nov 2012 at 8:12
Thanks for the feedback. I will decrease the delay. Please let me know if you
find more things that results in non-stable test cases.
Original comment by renasr...@gmail.com
on 13 Nov 2012 at 8:19
Happens on 4.3.1.
Rarely reproducible. Usually able to catch in on emulator running in headless
more. Taking screenshot right after waitForActivity returned with false shows
that activity is actually there.
Original comment by Paul.Tur...@gmail.com
on 31 Aug 2014 at 7:14
Please use 5.2.1.
Den 31 aug 2014 09:14 skrev <robotium@googlecode.com>:
Original comment by renasr...@gmail.com
on 31 Aug 2014 at 7:22
Just to add to my comment above: I'm unable to test this on 5.x verision of
robolectric because it crashes with OOM. See defect 627 for details.
Original comment by Paul.Tur...@gmail.com
on 31 Aug 2014 at 7:24
robotiume 5.2.1 also can reproduce this error.
I wrote test case as this:
protected void setUp() throws Exception {
super.setUp();
Intent i = new Intent();
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
setActivityIntent(i);
solo = new Solo(getInstrumentation());
getActivity();
}
public void testCapture() {
//solo.assertCurrentActivity("current activity is not CameraActivity", CameraActivity.class);
Activity act=solo.getCurrentActivity();
assertTrue(act.getClass().getName().equals("com.android.camera.CameraActivity"));
int id=act.getResources().getIdentifier("shutter_button", "id", act.getPackageName());//通过String的id获取int的id
ImageView shutterButton=(ImageView)act.findViewById(id);//获取View
solo.sleep(1000);
solo.clickOnView(shutterButton);
solo.sleep(1000);
//assertTrue(PhotoEditor.class.getName().equals("com.android.s3dgallery3d.photoeditor.PhotoEditor"));
//ActivityMonitor imageActivityMonitor = this.getInstrumentation().addMonitor(PhotoEditor.class.getName(), null, false);
solo.clickOnView(shutterButton);
solo.sleep(1000);
solo.waitForActivity(PhotoEditor.class.getName(),3000);
solo.assertCurrentActivity("Failure to start PhotoEditorActivity", PhotoEditor.class);
}
surely,cameraActivity and PhotoEditor in the same process.
but solo.assertCurrentActivity("Failure to start PhotoEditorActivity",
PhotoEditor.class) failed.
Original comment by lina_b...@163.com
on 4 Jan 2015 at 10:21
Original issue reported on code.google.com by
santus...@gmail.com
on 27 Apr 2012 at 7:15