0

I am doing testing for android app, My question is on button click i have to open website in browser through robotium once the website is open i have to call solo.goback() or any appropriate method so control comes back to the testing and testing proceeds further.

Can anybody tell me is there some way to do this.

Community
  • 1
  • 1
Nikhilesh Patve
  • 1,760
  • 3
  • 13
  • 31

1 Answers1

2

You can't go back using Robotium, once you call an Activity outside the application under test, Robotium loses control over it. Similar questions here and here.

One thing you can do is check if your Activity has lost focus using solo.hasWindowFocus() but this method can be tricky because if your Activity has a Dialog (or another Activity) on top, this method will return false even if you still in your AuT.

Community
  • 1
  • 1
mcns7
  • 56
  • 1
  • 10