imzzy / robotium

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

clickOnButton(String) working differently Debug vs Run in Android Studio #656

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Bring up dialog and enter data in edit text.
2. Solo.clickOnButton("Add")
3. Perform validation

What is the expected output? What do you see instead?
Data added to some data set. Fine in "debug" but performs validation before 
button click in "Run". There appears to be no button click at all in "Run".

What version of the product are you using? On what operating system?
Robotium 5.2.1 in Android Studio on Windows 7. Phone uses Android 4.0.3.

Please provide any additional information below.
Exactly the same methodology works fine on another test where the only 
difference is an autocompleteTextView for dialog entry instead of multiline 
EditText. Everything else is the same except for activity labels and actionbar 
icons.

Original issue reported on code.google.com by rizwan.c...@gmail.com on 4 Feb 2015 at 2:02

GoogleCodeExporter commented 9 years ago
The problem is that in debug, the execution is so much slower and therefore the 
tests are more flaky. If you put a large sleep in front of it you will see that 
it does indeed click. 

Original comment by renasr...@gmail.com on 5 Feb 2015 at 12:43

GoogleCodeExporter commented 9 years ago
Hi thanks for your reply. I put a 10 second sleep in front but still didn't
click. On another case, the wrong button was clicked.

Original comment by rizwan.c...@gmail.com on 5 Feb 2015 at 7:46

GoogleCodeExporter commented 9 years ago
I'm not sure what the issue could be. Robotium works by asking the View which 
coordinates it has and then it sends a pointer event there. It seems as if the 
View is giving incorrect information while being in debug mode..

Original comment by renasr...@gmail.com on 5 Feb 2015 at 4:49

GoogleCodeExporter commented 9 years ago
In debug it's fine. In normal mode I get weird places where things are
clicked.

Original comment by rizwan.c...@gmail.com on 5 Feb 2015 at 5:45