I want to read the text which comes from API end, When I query (query("*"))
it does not appear on the calabash-android console.
wait_for_text(text, timeout: 10)
does not work either.
Asked
Active
Viewed 610 times
-1

Aravin
- 6,605
- 5
- 42
- 58

user3799414
- 21
- 4
-
More information please. Can you ask the question in another way? What exactly are you trying to do and what have you tried? – jmoody Dec 18 '15 at 08:56
-
1. my app displays an error message for empty input fields. e.g. Email field can not be empty. 2. When I run it manually the message appears on the screen. 3. when I query("*") using calabash-android I do not see that text - "Email field can not be empty" in any of the elements. 5. The error message comes from API, and the class which contains the error message is not android.xxx but it is a class written by developer org.xxx.xxx and the text is displayed as "" .I can either ask developer to write that error message in text field and do it the usual way bt is there any other way to test it? – user3799414 Dec 18 '15 at 16:54
2 Answers
1
query "all * marked'Email field can not be empty'"
Calabash doesn't return results that are not visible by default. So if the error message is on the screen but just invisible, using the all
operator should do the trick.

Christopher Fuentes
- 311
- 1
- 3
1
In android two different message can show in edit text field by using hint text and error text
if its hint text use this:
query("* id:'edit_text_id'", :hint)
if its error message use this:
query("* id:'edit_text_id'", :error)
Normally these kind of text messages won't show by querying -> query("*")

Mani
- 1,199
- 2
- 9
- 22