Closed GoogleCodeExporter closed 9 years ago
Have you tried this on the emulator?
Original comment by renasr...@gmail.com
on 5 Jun 2011 at 3:02
[deleted comment]
Same behaviour in Emulator (Google API Level 8)
Original comment by JoaRe...@gmail.com
on 6 Jun 2011 at 9:25
Please see: "Why do text and button clicks get wrong?"
http://code.google.com/p/robotium/wiki/QuestionsAndAnswers
Original comment by renasr...@gmail.com
on 6 Jun 2011 at 9:57
Thank you for that hint.
I tried that in two seperate projects. While in one project the tags in the
manifest files helped, in the other project it didn't.
I am completely clueless why it does not work on both or neither.. Maybe you
know something more?
In my Project I have:
<supports-screens
android:anyDensity="true" />
<uses-sdk
android:targetSdkVersion="4"
android:minSdkVersion="3" />
In my Test Project I have:
<uses-sdk android:targetSdkVersion="4" />
Original comment by JoaRe...@gmail.com
on 6 Jun 2011 at 2:25
In the method Clicker.public void clickOnScreen(View view, boolean longClick,
int time)
the line
view.getLocationOnScreen(xy);
returns different values for the y-coordinate.
This is why the EditText is clicked instead of the Button.
Original comment by JoaRe...@gmail.com
on 6 Jun 2011 at 3:14
Robotium does not support version API version 4. It only works with Android 1.6
and up.
Original comment by renasr...@gmail.com
on 6 Jun 2011 at 3:42
Isn't Android 1.6 API version 4 ?
Original comment by JoaRe...@gmail.com
on 6 Jun 2011 at 3:46
The min version 3 (1.5) might be the reason why you are getting the wrong
coordinates back.
The only other reason why you would get the wrong coordinates back is because
of the screen densitiy issue described in the QA wiki page. You need to add
those tags to the application that you want to test (not the test project).
Original comment by renasr...@gmail.com
on 6 Jun 2011 at 3:50
I have now in my project:
<supports-screens
android:anyDensity="true" />
<uses-sdk
android:targetSdkVersion="8"
/>
And in my test project:
<uses-sdk android:targetSdkVersion="8"
/>
Same behaviour..
Original comment by JoaRe...@gmail.com
on 6 Jun 2011 at 4:00
As I said in the previous message it has to do with wrong coordinates being
given back to Robotium. This is not a Robotium defect. Unfortunetaly I can not
give you any other solution then what is described in the QA page.
Original comment by renasr...@gmail.com
on 6 Jun 2011 at 4:23
Hi,
I have just found the reason.
Before I opened the DatePickerDialog, a software keyboard was shown!
The keyboard will be closed once the DatePickerDialog is shown.
However, one has to close the keyboard manually (e.g. by calling Solo.goBack),
otherwise the following click will not be made correctly.
I attached a Sample Project and a Sample Test Project that makes this clear.
Note that the test projects writes the processing steps of the test to the
LogCat. You can see there that a wrong coordinate for the y-axis will be used.
(Used Emulator 2.2)
Original comment by JoaRe...@gmail.com
on 10 Jun 2011 at 9:31
Added the sample..
Original comment by JoaRe...@gmail.com
on 10 Jun 2011 at 9:31
Attachments:
Original issue reported on code.google.com by
JoaRe...@gmail.com
on 3 Jun 2011 at 10:42