Fixed android sample tests.#40
Open
hborders wants to merge 1 commit intostephanenicolas:masterfrom
Open
Conversation
Upgrading to robotium 4.3.1 fixed this exception (when run on a 4.4 emulator): ``` java.lang.RuntimeException: java.lang.ClassCastException: java.util.ArrayList cannot be cast to android.view.View[] at com.jayway.android.robotium.solo.Searcher.searchFor(Searcher.java:127) at com.jayway.android.robotium.solo.Waiter.waitForText(Waiter.java:383) at com.jayway.android.robotium.solo.Clicker.clickOn(Clicker.java:352) at com.jayway.android.robotium.solo.Solo.clickOnButton(Solo.java:742) at com.octo.android.sample.test.HelloAndroidActivityFestAndroidTest.testCompute(HelloAndroidActivityFestAndroidTest.java:25) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214) at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199) at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176) at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554) at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701) Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to android.view.View[] at com.jayway.android.robotium.solo.ViewFetcher.getWindowDecorViews(ViewFetcher.java:389) at com.jayway.android.robotium.solo.ViewFetcher.getAllViews(ViewFetcher.java:81) at com.jayway.android.robotium.solo.ViewFetcher.getViews(ViewFetcher.java:189) at com.jayway.android.robotium.solo.ViewFetcher.getCurrentViews(ViewFetcher.java:308) at com.jayway.android.robotium.solo.ViewFetcher.getCurrentViews(ViewFetcher.java:295) at com.jayway.android.robotium.solo.Searcher$1.call(Searcher.java:112) at com.jayway.android.robotium.solo.Searcher$1.call(Searcher.java:106) at com.jayway.android.robotium.solo.Searcher.searchFor(Searcher.java:203) at com.jayway.android.robotium.solo.Searcher.searchFor(Searcher.java:125) ... 18 more ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrading to robotium 4.3.1 fixed this exception (when run on a 4.4 emulator):