Closed GoogleCodeExporter closed 9 years ago
Due to regex support in searchText() some characters will trigger it. Use
Pattern.quote(string) example: Pattern.qoute("provisioning_wizard_title_2")
Original comment by renasr...@gmail.com
on 19 Jul 2013 at 10:59
Thanks! It works!!! :)
Original comment by flavioca...@gmail.com
on 19 Jul 2013 at 12:16
I'm having the same problem with this string:
<string name="terms_and_conditions_title">Terms & Conditions</string>
Original comment by flavioca...@gmail.com
on 22 Jul 2013 at 3:47
Does searchText("Terms") work?
Original comment by renasr...@gmail.com
on 23 Jul 2013 at 8:54
Thank for answering.
Yes It works with that string but now it's not working with another string:
<string name="end_wizard_text">
Service activation wizard is almost complete. Press \'Done\' button to
activate MDP Client.
</string>
I'm calling it from Robium test class as follow:
Activity act=solo.getCurrentActivity();
String s =
solo.getString(act.getResources().getIdentifier("end_wizard_text",
"string", act.getPackageName()));
return Pattern.quote(s);
assertTrue("End activation screen expected.",
solo.searchText(Pattern.quote(s)));
But it never fails; If i test this on a different layout it
solo.searchText() keeps on returning true even if I don't have that text on
the screen.
Thank you!
Flavio Capaccio - (+39) 3928925046
Original comment by flavioca...@gmail.com
on 23 Jul 2013 at 8:59
Then you need to use public boolean searchText(String text, boolean
onlyVisible) as the view is still there but hidden. Setting onlyVisible to true
will only search for visible views. Please see the javadoc for more
information.
https://code.google.com/p/robotium/wiki/RobotiumAPIDocumentation
Original comment by renasr...@gmail.com
on 23 Jul 2013 at 9:02
Original issue reported on code.google.com by
flavioca...@gmail.com
on 19 Jul 2013 at 8:59