ChooserActivity was not found when testing Robotium, while ChooserActivity shows on Nexus 5

I am starting to develop an Android project. I am writing tests. I want to check the ChooserActivity display. When I used the LG g2 tests, they are transmitted. However, when I used the Nexus 5 tests (Lollipop), it failed.

The code is as follows:

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:

enter image description here

LG G2 ScreenShot:

enter image description here

If a test run is specified on a Nexus error that matches the following

 Running tests Test running started junit.framework.AssertionFailedError: ChooserActivity is not found! 

How can I continue? Why is the Chooser Activity feature not found on Nexus 5?

+5
source share
1 answer

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, go to Run → Run Configurations and click the Target tab in the right pane. Hope this helps

+6
source

Source: https://habr.com/ru/post/1211512/


All Articles