The -no-window option disable the emulator's graphical window display.
Robotium needs the window display to be able to interact with the
button.
/Renas
On May 4, 3:59 pm, Jens Hohl <
jens.h...@googlemail.com> wrote:
> I'm Using Robtium 4.1
>
> When i run my Robotium test on an Emulator which is visible i can click on
> an Button using:
>
> final Button startButton = (Button) solo.getCurrentActivity().findViewById(
> com.coop.R.id.btn_start);
> solo.clickOnView(startQuizButton);
>
> Doing the same thing in an Emulator which was launched invisible with the
> -no-window Option i get the exception :
>
> [INFO] android.device parameter set to emulator
> [INFO] emulator-5554_AVD_for_Galaxy_Tab_10_1_unknown_sdk : Running
> instrumentation tests in com.company.abc.app.test
> [INFO] emulator-5554_AVD_for_Galaxy_Tab_10_1_unknown_sdk : Run started:
> com.company.abc.app.test, 1 tests:
> [INFO] emulator-5554_AVD_for_Galaxy_Tab_10_1_unknown_sdk : Start
> [1/1]: com.company.abc.app.SingleChoiceTest#testappType
> [INFO] emulator-5554_AVD_for_Galaxy_Tab_10_1_unknown_sdk :
> FAILURE:com.company.abc.app.SingleChoiceTest#testappType
> [INFO] emulator-5554_AVD_for_Galaxy_Tab_10_1_unknown_sdk :
> junit.framework.AssertionFailedError: Click can not be completed!
> at com.jayway.android.robotium.solo.Clicker.clickOnScreen(Clicker.java:85)
> at com.jayway.android.robotium.solo.Clicker.clickOnScreen(Clicker.java:157)
> at com.jayway.android.robotium.solo.Clicker.clickOnScreen(Clicker.java:131)
> at com.jayway.android.robotium.solo.Solo.clickOnView(Solo.java:879)
> at
> com.company.abc.app.BaseappModuleRobotiumTest.checkIntroductionActivity(Bas eappModuleRobotiumTest.java:155)
> at
> com.company.abc.app.BaseappModuleRobotiumTest.testappType(BaseappModuleRobo tiumTest.java:174)
>
> I read the "Why do text and button clicks get wrong?" And checked back
> again, still same problem to me :/
>
> Any help on this ?
>
> Best regards,
> Jens