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.

Rex Nihilo
  • 604
  • 2
  • 7
  • 16
Bharat
  • 2,960
  • 2
  • 38
  • 57

2 Answers2

0

You could identify a view in the splashscreen and then click on it. Something like: View v = solo.getView(R.id.something) solo.clickOnView(v)

Franck
  • 512
  • 1
  • 9
  • 16
0

You can use it as

Activity activity = solo.getCurrentActivity();
View view = activity.getCurrentFocus(); 
solo.clickOnView(view);
Echilon
  • 10,064
  • 33
  • 131
  • 217
kamal_prd
  • 543
  • 4
  • 16