sangmingming / robotium

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

Failure with Dialog on Android 4.0 #186

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. solo.clickOnText("Text")
2. solo.clearEditText(0)
3. solo.enterText("Text_New")
4. solo.clickOnButton("OK")

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

Expected output would be an opening Dialog Window, clear the Textfield, enter 
the Text "Text_New" click on "OK" Button.

I do this for many elements in a List (Preferences), and sometimes the Dialog 
Window opens sometimes not, but I always get this failure:

junit.framework.AssertionFailedError: EditText with index -1 is not available!
at com.jayway.android.robotium.solo.Waiter.waitForAndGetView(Waiter.java:359)
at com.jayway.android.robotium.solo.Solo.clearEditText(Solo.java:1257)

What version of the product are you using? On what operating system?

Robotium 3.0

Please provide any additional information below.

This problem only occurs since I have used Robotium 3.0 and this problem is 
only on Android4.0 for all other Android versions it works perfectly. With 
Robotium 2.6 it also works on Android 4.0.

Original issue reported on code.google.com by andi.hof...@gmail.com on 16 Nov 2011 at 7:39

GoogleCodeExporter commented 9 years ago
It works for Robotium 2.5 not 2.6, sry for this mistake.

Original comment by andi.hof...@gmail.com on 16 Nov 2011 at 7:43

GoogleCodeExporter commented 9 years ago
Thanks for this. Would it be possible for you to send me your application?

Original comment by renasr...@gmail.com on 16 Nov 2011 at 8:25

GoogleCodeExporter commented 9 years ago
Please update your test case so that you use: waitForText(Something shown in 
the dialog) before clearEditText() my guess is that it is a timing issue. 

Original comment by renasr...@gmail.com on 16 Nov 2011 at 8:27

GoogleCodeExporter commented 9 years ago
This has been fixed in Robotium 3.1. Remember to always use a waitFor method 
when a new window is expected to open. 

Original comment by renasr...@gmail.com on 9 Jan 2012 at 12:00