Reputation: 122
I get the error No element found for query: textView marked:'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod temper incididunt'.
It shows up in the console with query("*"), but when I query("textView marked:'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod temper incididunt'") I get [].
My test won't pass but the text shows up in the console...
Is there a character limit or am I missing something?
Upvotes: 1
Views: 1567
Reputation: 4081
If the class of the view is not TextView
but an extension of TextView
you have to use:
query("TextView text:'...'")
A better approach would be to use * instead of TextView
- the test won't fail even if the class of the field changes:
query("* text:'...'")
An even better approach would be to use id
instead of text:
query("* id:'lorem_ipsum_view'")
Upvotes: 1
Reputation: 477
If it's like all of my experience, you'll want to use:
query "TextView marked:'...'"
note the capital T on TextView because it's a class
Since I'm guessing the Lorem, ... is text, not id or description, you could use:
query "* text:'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod temper incididunt'"
I don't believe it should be an issue, but if for some reason marked doesn't accept strings that long, text should
Upvotes: 0