Closed GoogleCodeExporter closed 9 years ago
Please see "Common Robotium Issues"
http://code.google.com/p/robotium/wiki/QuestionsAndAnswers
Original comment by renasr...@gmail.com
on 18 Mar 2013 at 11:45
I saw this document but it has nothing to do with this issue.
1. I'm not getting NullPointerException
2. I'm not getting java.lang.NoClassDefFoundError
3. I'm using correct target package
Original comment by Dmitry.Z...@gmail.com
on 18 Mar 2013 at 11:50
Please paste your test class.
Original comment by renasr...@gmail.com
on 18 Mar 2013 at 11:53
package com.agimind.agmenu.test;
import com.agimind.agmenu.main.MainActivity;
import com.jayway.android.robotium.solo.Solo;
import android.test.ActivityInstrumentationTestCase2;
public class FilterTest extends ActivityInstrumentationTestCase2<MainActivity> {
private Solo mSolo;
public FilterTest() {
super(MainActivity.class);
}
@Override
protected void setUp() throws Exception {
super.setUp();
mSolo = new Solo(getInstrumentation(), getActivity());
}
public void testSideMenu() throws Exception {
assertTrue(true);
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
mSolo.finishOpenedActivities();
}
}
Target package is "com.agimind.agmenu" (which is correct).
Original comment by Dmitry.Z...@gmail.com
on 18 Mar 2013 at 11:55
I just find out that this may be caused by not yet instantinated Activity. If
I'll call getActivity() manually in Eclipse (using expressions) then Solo
getting created.
Original comment by Dmitry.Z...@gmail.com
on 18 Mar 2013 at 12:02
Ok. You can call getActivity() before solo = new Solo(getInstrumentation())
Original comment by renasr...@gmail.com
on 18 Mar 2013 at 12:03
It doesn't help to call getActivity() from code. As I said - I used Eclipse
tool called Expressions to put breakpoint, directly call getActivity() before
creating Solo, wait until it will complete and then use Solo.
Original comment by Dmitry.Z...@gmail.com
on 18 Mar 2013 at 12:16
Unfortunately I do not know what your issue is. If you can send me your
application then I can have a look at it.
Original comment by renasr...@gmail.com
on 19 Mar 2013 at 7:33
Surprisingly to myself I found out that Android JUnit test itself is not
working anymore in my application (not sure why), so this is not problem of
Robotium.
Sorry for disturbance.
Original comment by Dmitry.Z...@gmail.com
on 19 Mar 2013 at 7:35
Original issue reported on code.google.com by
Dmitry.Z...@gmail.com
on 18 Mar 2013 at 11:35