Re: TestAndroidCalculatorTestApp

57 views
Skip to first unread message

naveed

unread,
Jan 10, 2013, 12:07:03 AM1/10/13
to robotium-...@googlegroups.com
It should work fine, if one exactly follows the steps. 


On Wednesday, November 7, 2012 5:23:43 AM UTC+5, sandesh wrote:
Hi,

I copied AndroidCalculatorTest code from TestAndroidCalculatorTestApp.pdf

But I am getting following failure trace.

junit.framework.AssertionFailedError: EditText with index 0 is not available!
at com.jayway.android.robotium.solo.Waiter.waitForAndGetView(Waiter.java:362)
at com.jayway.android.robotium.solo.Solo.enterText(Solo.java:1290)
at com.calculator.test.TestMain.testDisplayBlackBox(TestMain.java:28)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:204)
at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:194)
at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:186)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:529)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1448)


Please reply at your convenience.
Thanks in advance!!!

Manasa Muchchatti

unread,
Jan 18, 2013, 2:25:45 AM1/18/13
to robotium-...@googlegroups.com
If a view is not visible to robotium it throws such kind of messages. So there could be two possibilities,

1. There is no editText view at index 0.(Try to findout if its the only editText view on app window. If its not then find out wats the exact index of your view.)
2. Your app is taking time to open, and solo tried to search it before that window is even launched.(Give solo.sleep() or solo.wait() if this is the case)

--
You received this message because you are subscribed to the Google Groups "Robotium Developers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/robotium-developers/-/D2O32_lGm_UJ.
To post to this group, send email to robotium-...@googlegroups.com.
To unsubscribe from this group, send email to robotium-develo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/robotium-developers?hl=en.



--
Thanks and Regards,
Manasa I M

naveed

unread,
Jan 18, 2013, 3:37:03 AM1/18/13
to robotium-...@googlegroups.com

Hi Anbarasan, 

Are you done with this ? 
To unsubscribe from this group, send email to robotium-developers+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/robotium-developers?hl=en.
Reply all
Reply to author
Forward
0 new messages