austgl / robotium

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

solo.clickOnText does not work on 4.0.1 #234

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run a script with solo.clickOnText("Aanmelden"); on a 2.2.1 device (Samsung 
Galaxy S)
2. run exactly the same script on a Galaxy Nexus with Android 4.0
3.

What is the expected output? What do you see instead?
I expect the scripts to do exactly the same on these devices, and not a crash 
on the Nexus

What version of the product are you using? On what operating system?
Robotium 3.1
OS 2.2.1
OS 4.0.1

Please provide any additional information below.

I have script which runs fine on a Galaxy S, but crashes almost immediately 
when it arrives at a clickOnText statement. Crashlog below:

03-14 16:10:13.074: INFO/TestRunner(19796): ----- begin exception -----
03-14 16:10:13.081: INFO/TestRunner(19796): java.lang.RuntimeException: 
java.lang.NullPointerException
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
com.jayway.android.robotium.solo.Searcher.searchFor(Searcher.java:107)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
com.jayway.android.robotium.solo.Waiter.waitForText(Waiter.java:253)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
com.jayway.android.robotium.solo.Clicker.clickOnText(Clicker.java:254)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
com.jayway.android.robotium.solo.Solo.clickOnText(Solo.java:828)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
com.xxx.mobile.test.flows.Utils.menu(Utils.java:656)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
com.xxx.mobile.test.flows.zAddressbook.test(zAddressbook.java:35)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
java.lang.reflect.Method.invokeNative(Native Method)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
java.lang.reflect.Method.invoke(Method.java:511)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTes
tCase2.java:186)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
junit.framework.TestCase.runBare(TestCase.java:127)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
junit.framework.TestResult$1.protect(TestResult.java:106)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
junit.framework.TestResult.runProtected(TestResult.java:124)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
junit.framework.TestResult.run(TestResult.java:109)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
junit.framework.TestCase.run(TestCase.java:118)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:53
7)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1551)
03-14 16:10:13.081: INFO/TestRunner(19796): Caused by: 
java.lang.NullPointerException
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
com.jayway.android.robotium.solo.ViewFetcher.getNonDecorViews(ViewFetcher.java:1
88)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
com.jayway.android.robotium.solo.ViewFetcher.getAllViews(ViewFetcher.java:112)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
com.jayway.android.robotium.solo.ViewFetcher.getViews(ViewFetcher.java:232)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
com.jayway.android.robotium.solo.ViewFetcher.getCurrentViews(ViewFetcher.java:43
0)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
com.jayway.android.robotium.solo.ViewFetcher.getCurrentViews(ViewFetcher.java:41
7)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
com.jayway.android.robotium.solo.Searcher$1.call(Searcher.java:99)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
com.jayway.android.robotium.solo.Searcher$1.call(Searcher.java:93)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
com.jayway.android.robotium.solo.Searcher.searchFor(Searcher.java:136)
03-14 16:10:13.081: INFO/TestRunner(19796):     at 
com.jayway.android.robotium.solo.Searcher.searchFor(Searcher.java:105)
03-14 16:10:13.081: INFO/TestRunner(19796):     ... 19 more
03-14 16:10:13.081: INFO/TestRunner(19796): ----- end exception -----

Original issue reported on code.google.com by GillesBa...@gmail.com on 14 Mar 2012 at 3:26

GoogleCodeExporter commented 9 years ago
Are you sure you are using Robotium 3.1? This is an issue that we had before 
the 2.5 release (which did not support honeycomb)

Original comment by renasr...@gmail.com on 15 Mar 2012 at 6:37

GoogleCodeExporter commented 9 years ago
Please use Robotium 3.1.

Original comment by renasr...@gmail.com on 15 Mar 2012 at 6:41

GoogleCodeExporter commented 9 years ago
When I right click on the project, select properties, Java Build Path, 
Libraries, I see robotium-solo-3.1.jar

Are there any other places I should check? Is there any way to have Robotium 
itself tell me its version? Something like solo.getVersion?

Original comment by GillesBa...@gmail.com on 16 Mar 2012 at 8:19

GoogleCodeExporter commented 9 years ago
No, there is no getVersion(). Please download 3.1 at the bottom of the 
following page:

http://code.google.com/p/robotium/downloads/list

Original comment by renasr...@gmail.com on 16 Mar 2012 at 8:25

GoogleCodeExporter commented 9 years ago
That's where I got it: When I right click on the project, select properties, 
Java Build Path, Libraries, I see robotium-solo-3.1.jar

Original comment by GillesBa...@gmail.com on 19 Mar 2012 at 8:48