Hello,
I have problem with identifying current activity.
My application in test [I'm testing apk file directly] has activity A
from which activity B is opened.
in setUp method I do
"solo = new Solo(getInstrumentation(), getActivity());"
and later in test
solo.clickOnText("Test1"); //Test1 text is in activity A
solo.sleep(5000); //now the application should be in activity B
solo.assertCurrentActivity("This is not chat screen!", "B"); // this fails
I tried to check activity using "solo.getCurrentActivity().toString()"
and that returns "A" even if app is already in B activity
I found following issue
https://code.google.com/p/robotium/issues/detail?id=179
but the workaround does not work for me
this code behaves the same
"solo = new Solo(getInstrumentation());"
at the begining of test function
getActivity();
later
solo.clickOnText("Test1"); //Test1 text is in activity A
solo.sleep(5000); //now the application should be in activity B
solo.assertCurrentActivity("This is not chat screen!", "B"); // this fails
I checked the "stack" using the "adb shell dumpsys" and from that it
looks like the B is above the A including the flag "nowVisible=true"
Any idea what I'm doing wrong?
Robotium 3.6 or 4.0; Android 2.3.3 [SDK 10]
Thanks,
Vladimir