Closed GoogleCodeExporter closed 9 years ago
Have you tried to set the lable of the checkbox in the application that you are
testing? In the xml file were you define them.
Original comment by renasr...@gmail.com
on 20 Apr 2011 at 7:35
yup, in fact, it is initially labeled through the main.xml and strings.xml
settings.xml:
<CheckBoxPreference android:key="music"
android:title="@string/music_title" android:summary="@string/music_summary"
android:defaultValue="true" />
<CheckBoxPreference android:key="hints"
android:title="@string/hints_title" android:summary="@string/hints_summary"
android:defaultValue="true" />
strings.xml:
<string name="music_title">Music</string>
<string name="music_summary">Play background music</string>
<string name="hints_title">Hints</string>
<string name="hints_summary">Show hints during play</string>
if I am right, android:title="@string/hints_title" and
android:title="@string/music_title" would be its label. so its predefined.
Original comment by ph3so_...@yahoo.com
on 20 Apr 2011 at 8:01
Would it be possible for you to email me your application?
Original comment by renasr...@gmail.com
on 20 Apr 2011 at 8:05
Mr. Renas - sensei,
the file attached above, which is the "Android Sudoku Test.zip" already
contains the test project and the project to be tested.
I hope you will be able to show what my problem was. oh please.. :D
Regards,
Mark
Original comment by ph3so_...@yahoo.com
on 20 Apr 2011 at 8:27
Great. I will have a look at it as soon as I have some time over to see what
the problem is.
Original comment by renasr...@gmail.com
on 20 Apr 2011 at 8:30
Thankee thanks.
I hope you will be able to point what my problem was and also, to correct if
there has been a misunderstanding im my part.
-Mark
Original comment by ph3so_...@yahoo.com
on 20 Apr 2011 at 9:34
You will need to use checkBox.setText() in your application in order for this
method to work correctly. What Robotium sees now when doing a getText() is an
empty string and therefore it returns false.
Original comment by renasr...@gmail.com
on 20 Apr 2011 at 10:46
[deleted comment]
So your saying that the one in the CheckboxPreference(title) within the
settings.xml is not its label?
whoa.
ok, will try the one that you pointed out.
and will reply once i tried it. thanks
-mark
Original comment by ph3so_...@yahoo.com
on 20 Apr 2011 at 2:01
If setText() is not used, getText() will not return any value.
Original comment by renasr...@gmail.com
on 21 Apr 2011 at 5:46
Original issue reported on code.google.com by
ph3so_...@yahoo.com
on 20 Apr 2011 at 12:23Attachments: