When the test running was NPE

18 views
Skip to first unread message

travu...@gmail.com

unread,
Mar 5, 2015, 9:58:00 AM3/5/15
to robotium-...@googlegroups.com
When the test running was NPE in the line
solo.clickOnView(solo.getView("action_edit"));

This incident is happened once, usually works fine. Our developers say that the error in Robotium. Here It Is stack trace:
java.lang.NullPointerException
at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3479)
at android.widget.ListView.findViewTraversal(ListView.java:3636)
at android.view.View.findViewById(View.java:17119)
at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3480)
at android.view.View.findViewById(View.java:17119)
at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3480)
at android.view.View.findViewById(View.java:17119)
at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3480)
at android.view.View.findViewById(View.java:17119)
at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3480)
at android.view.View.findViewById(View.java:17119)
at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3480)
at android.view.View.findViewById(View.java:17119)
at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3480)
at android.view.View.findViewById(View.java:17119)
at android.view.Window.findViewById(Window.java:924)
at android.app.Activity.findViewById(Activity.java:2008)
at com.robotium.solo.Getter.getView(Getter.java:123)
at com.robotium.solo.Getter.getView(Getter.java:160)
at com.robotium.solo.Solo.getView(Solo.java:2193)
at com.robotium.solo.Solo.getView(Solo.java:2181)
at com.mycompany.tests.CATests.test3(CATests.java:555)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1729)


Renas

unread,
Mar 5, 2015, 5:21:24 PM3/5/15
to robotium-...@googlegroups.com
What command do you have at this line: CATests.java:555? Solo.clickOnView() will check if a View is null and if it is it will fail the test case. 

Renas

--
You received this message because you are subscribed to the Google Groups "Robotium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotium-develo...@googlegroups.com.
To post to this group, send email to robotium-...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotium-developers.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages