0

I am using Robotium to automate Android UI. The app I am testing has a splash screen when it is launched and the screen is shown for x seconds. On tapping the screen before x seconds, the splash screen has to be dismissed.

I have tried solo.clickOnScreen(100, 100) , solo.sendKey(66) , where 66 corresponds to RETURN key. But the splash screen is not dismissed.

How do I simulate the user's action of tapping the screen to dismiss the splash screen?

Thanks.

4

2 回答 2

0

您可以在启动画面中识别一个视图,然后单击它。类似于: View v = solo.getView(R.id.something) solo.clickOnView(v)

于 2012-10-31T16:48:24.480 回答
0

您可以将其用作

Activity activity = solo.getCurrentActivity();
View view = activity.getCurrentFocus(); 
solo.clickOnView(view);
于 2012-11-02T08:23:04.357 回答