I start developing a Android Project. I am writing testsuites. I want to test showing ChooserActivity. When I used a LG g2 tests are passed. However When I used a Nexus 5 (Lollipop) tests are failed.
Code is as following:
public void testRun() {
int timeout = 5;
// Wait for activity: 'course.labs.intentslab.ActivityLoaderActivity'
assertTrue("course.labs.intentslab.ActivityLoaderActivity is not found!",
solo.waitForActivity(course.labs.intentslab.ActivityLoaderActivity.class));
// Click on Implicit Activation
solo.clickOnView(solo
.getView(course.labs.intentslab.R.id.implicit_activation_button));
// Wait for activity: 'com.android.internal.app.ChooserActivity'
assertTrue("ChooserActivity is not found!",
solo.waitForActivity("ChooserActivity"));
// Click on MyBrowser
solo.clickInList(2, 0);
}
Nexus ScreenShot:
LG G2 ScreenShot:
When test run on Nexus error is given which is as following
Running tests
Test running started
junit.framework.AssertionFailedError: ChooserActivity is not found!
How Can I proceed? Why Chooser Activty is not found on Nexus 5?
Unfortunately, you will need to choose a Galaxy Nexus AVD emulator with API level 18( and not Lollipop - API level 21) . To view the available target devices and their API levels in Eclipse, goto Run --> Run configurations , and click the Target tab on the right pane. Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With