rahul7386 / robotium

Automatically exported from code.google.com/p/robotium
0 stars 0 forks source link

EditText not Found !!! #537

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
public void testLogin() throws InterruptedException {
        solo.waitForActivity(LAUNCHER_ACTIVITY_FULL_CLASSNAME);     
        solo.clickOnScreen(100, 100);
        solo.clickOnButton("Log In");
        solo.clearEditText(0);
        solo.enterText(0, "stest123");
        solo.clearEditText(1);
        solo.enterText(1, "123456");
        final EditText etext = solo.getEditText(1);
        solo.waitForActivity(LAUNCHER_ACTIVITY_FULL_CLASSNAME);
        Runnable runnable = new Runnable() {
            public void run() {
                etext.onEditorAction(EditorInfo.IME_ACTION_DONE);
            }
        };

        solo.getCurrentActivity().runOnUiThread(runnable);
        assertTrue(solo.searchText("All"));
               solo.waitForActivity(solo.getCurrentActivity().toString());
        solo.clickOnScreen(239, 761, 1);
        solo.sleep(5000);
    }

Why I am getting the below error ??

junit.framework.AssertionFailedError: EditText is not found!
at com.jayway.android.robotium.solo.Waiter.waitForAndGetView(Waiter.java:501)
at com.jayway.android.robotium.solo.Solo.clearEditText(Solo.java:1783)
at com.WhatsApp.test.StartWhatsApp.testLoginToWhatsApp(StartWhatsApp.java:53)
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(ActivityInstrumentationTes
tCase2.java:192)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175)
at 
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:55
5)
at 
android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1661)

Where is the error???

Original issue reported on code.google.com by Tlakh...@gmail.com on 21 Oct 2013 at 4:00

GoogleCodeExporter commented 9 years ago
Thanks for reporting this. Would it be possible for you to share an app that 
exhibits this issue?

Original comment by renasr...@gmail.com on 22 Oct 2013 at 6:18

GoogleCodeExporter commented 9 years ago
I am sorry. I can't share apk file with you. 

Original comment by Tlakh...@gmail.com on 22 Oct 2013 at 7:25

GoogleCodeExporter commented 9 years ago
Can you send a screenshot of the screen? You can mail it to renasreda@gmail.com.

Original comment by renasr...@gmail.com on 22 Oct 2013 at 7:27

GoogleCodeExporter commented 9 years ago
Okay I can do that.

Original comment by Tlakh...@gmail.com on 22 Oct 2013 at 8:38

GoogleCodeExporter commented 9 years ago
If the application crashes also the test execution stops. 

Original comment by renasr...@gmail.com on 23 Oct 2013 at 7:29

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Please tell me what shall I do in such scenario ???

Original comment by Tlakh...@gmail.com on 23 Oct 2013 at 7:47

GoogleCodeExporter commented 9 years ago
If it is not EditText, but TextView then could you please let me know how to 
enter text in textfieds using TextView ???

I am unable to see hierarchy Viewer of an app so I am just guessing 
EditText/TextView..........

Original comment by Tlakh...@gmail.com on 23 Oct 2013 at 8:53