zzwendy / robotium

Automatically exported from code.google.com/p/robotium
0 stars 0 forks source link

waitForFragment on vers < 3.0 #589

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Reproduce the error

 - call getSolo().waitForFragmentByTag(tag) where tag is some random text and not a proper tag and the activity is an extension of FragmentActivity

expected result:

- The excepted result should be "false"
- You get an exception --> java.lang.NoSuchMethodError: 
android.app.Activity.getFragmentManager

tools and os:

Android studio 0.5.1
Test running on Android < 3.0

Infos:

The bug is probably inside the Waiter class inside the method waitForFragment 
on line 556.

If the fragment is not found using getSupportFragment and you are using a 
FragmentActivity, it tries to use getFragment who calls getFragmentManager that 
is invalid method FragmentActivity throwing NoSuchMethodError

            if(getSupportFragment(tag, id) != null)
                return true;

            if(getFragment(tag, id) != null)
                return true;

Original issue reported on code.google.com by federico...@gmail.com on 19 Mar 2014 at 3:19

GoogleCodeExporter commented 9 years ago
Thanks for reporting this.

Original comment by renasr...@gmail.com on 19 Mar 2014 at 6:10

GoogleCodeExporter commented 9 years ago
Thanks again for reporting this. This has been fixed in Robotium 5.2.1.

Original comment by renasr...@gmail.com on 18 Jun 2014 at 3:13