I am trying to use Testdroid which is backed by Robotium.
Background:
FragmentStatePagerAdapter
does not assign tag values for fragments (unlike FragmentPagerAdapter
) so waitForFragmentByTag
won't work; as a result I use waitForFragmentById
, which I am unable to get working as expected.
My fragments are defined in xml (fragment.xml) which defines the UI structure and layout. My fragments are also defined in code (Fragment.java), which is where listeners are registered etc.
I have debugged through the ExtSolo
source code and when the Waiter
calls the fragmentManager (both) null values are returned for both the ID defined in the @id tag of the parent element in the XML (R.id.fragment
) and also the ID defined by the file itself (R.layout.fragment
).
Are these the correct ID values to be using? If not, what is? Any help greatly appreciated.