Is anyon开发者_开发技巧e aware of a way to check the existence of fragment using Robotium?
Regards Rc
I'm assuming that you want to find the existence of a fragment that you know the activity or tag for.
first call getCurrentActivity()
on Solo and then call
getFragmentManager().findFragmentById()
or
getSupportFragmentManager().findFragmentById()
if you're using the v4 compatibility
library. That will search all the fragments on the page and return it. You can also use findFragmentByTag()
if you've previously tagged the Fragment.
精彩评论