landryshuai / robotium

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

Clicker doesn't work (solo.clickOnScreen) #576

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the product are you using? On what operating system?
5.0.1/windows7 x64

Please provide any additional information below.
junit.framework.AssertionFailedError: View is null and can therefore not be 
clicked!
    at com.robotium.solo.Clicker.clickOnScreen(Clicker.java:171)
    at com.robotium.solo.Clicker.clickOnScreen(Clicker.java:158)
    at com.robotium.solo.Solo.clickOnView(Solo.java:1006)
    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)

Original issue reported on code.google.com by andrei.c...@gmail.com on 11 Feb 2014 at 10:55

GoogleCodeExporter commented 9 years ago
The reason you are getting this issue is due to the View being null when you 
try to click it. I can recommend you to use solo.getView() to get the view. 

Original comment by renasr...@gmail.com on 11 Feb 2014 at 4:42