Re: Espresso wait for a view

604 views
Skip to first unread message
Message has been deleted

Josef Šimánek

unread,
Oct 30, 2013, 4:54:26 PM10/30/13
to espresso-...@googlegroups.com
This is not Android Espresso mail group. This group was created for espresso - ruby web framework. I'm not sure if anyone here can help you.

Dne středa, 30. října 2013 21:51:12 UTC+1 Craig Fisher napsal(a):
Hey all, 

So forgive me if I sound like an idiot but I'm predominately a iOS developer but making the switch over to Android.  I kinda feel like I'm fighting the framework right now which is why I'm posing this questions.  I have a test fragment that reads: 

onView(withId(R.id.edittext_quotes_find_symbol))

.perform(typeText("ADBE"));


Basically I'm searing for a stock symbol....this work all fine and dandy and the test passes.  After typing in the text "ADBE" (adobe if you were curious) I'm automatically searching for the symbol with the text entered into the text field and the output is tossed into a list view that is populated once it's found.


onView(withId(R.id.listview_quotes_find_symbol_results))

.check(matches(withText("ADBE")));


The problem that I'm running into is that in my test environment it can take 3-4 seconds for the results to load.  Is there some kind of "delay" or "wait for view" that I can use so that I can wait for the view to become available?  Or can I change some sort of timer that my test will try to run for?


Thanks in advance for any thoughts and SO sorry for asking a newb question!


-Craig

Message has been deleted
Message has been deleted

Craig Fisher

unread,
Oct 30, 2013, 6:02:43 PM10/30/13
to espresso-...@googlegroups.com
Sorry....it's been a long day...

Nagashree H S

unread,
May 18, 2015, 6:01:12 AM5/18/15
to espresso-...@googlegroups.com
Hi Team,

Am facing the same issue as mentioned by Craig, I want to wait till the list is displayed which takes between 3-5 seconds. But as it is a dynamic time I can't put sleep or wait for a fixed time which hits my performance. Is there any alternative for me to wait only till the list is displayed.

Waiting for quick and positive replies.

Regards,
Nagashree H S
Reply all
Reply to author
Forward
0 new messages