I have a layout file map_layout.xml
in my android application. which holds MapFragment
. I want to use this fragment in my test project using Robotium. Objective is to click the markers for testing purpose.
I am getting the ID but not able to get the fragment instance. Anyone who can help?
int id = activity.getResources().getIdentifier("googleMap","id",solo.getCurrentActivity().getPackageName());
Log.d(TAG, "My ID is..." + id);
Log.d(TAG, "Frag is..." + activity.getFragmentManager().findFragmentById(id));