landryshuai / robotium

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

Edit Text not taking values! #562

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am running my below solo script:

public void testCanOpenSettings() throws InterruptedException{  
        try{
            solo.enterText(1, "test");
            solo.enterText(3, "test");
            solo.clickOnButton("Login");
            solo.sleep(3000);
            solo.clickOnButton("Logout");
        }
        catch(Exception e){
            e.printStackTrace();
        }
}   

What is the expected output? What do you see instead?

junit.framework.AssertionFailedError: 4 EditTexts are not found!
at com.jayway.android.robotium.solo.Waiter.waitForAndGetView(Waiter.java:507)
at com.jayway.android.robotium.solo.Solo.enterText(Solo.java:1681)
at 
com.androidhive.sessions.TestSessionManagement.testCanOpenSettings(TestSessionMa
nagement.java:42)
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)

What version of the product are you using? On what operating system?
1.Windows 7 

Please provide any additional information below.
1.First Edit text is not taking values.

Original issue reported on code.google.com by kumar.mo...@gmail.com on 6 Dec 2013 at 8:48

GoogleCodeExporter commented 9 years ago
The index of the first EditText is 0. Index of second 1 etc.

Original comment by renasr...@gmail.com on 6 Dec 2013 at 2:37

GoogleCodeExporter commented 9 years ago
The index of the first EditText is 0. Index of second 1 etc.

Original comment by renasr...@gmail.com on 6 Dec 2013 at 2:37

GoogleCodeExporter commented 9 years ago
Yes its working fine! Thanks buddy!

Original comment by kumar.mo...@gmail.com on 6 Dec 2013 at 4:56