We are having one question in mind, when we are using Robotium for testing.
You can find the details information from the following link http://code.google.com/p/robotium/wiki/QuestionsAndAnswers
But we are having alternative approach, where we can achieve taking snapshot of the screen.
Android Robotium ScreenShot Code
By using the above code snippet, we can achieve taking snapshot in Robotium, when your test case fail or success.
Enjoy :)
Can I take screenshots from inside of Robotium?
Ans: No. we are not having direct API's.You can find the details information from the following link http://code.google.com/p/robotium/wiki/QuestionsAndAnswers
But we are having alternative approach, where we can achieve taking snapshot of the screen.
Android Robotium ScreenShot Code
By using the above code snippet, we can achieve taking snapshot in Robotium, when your test case fail or success.
Enjoy :)
Thanks for sharing the above code. I guess now Robotium 3.3's includes a function "takeScreenshot()"... haven't tried it though.
ReplyDeleteSince Robotium is tied to the application under test, I am not able to take the screenshot of the device if the activity closes or is in background. Do you know how can we support screen capture when other activity is in focus.
ReplyDeleteI am not able to get your question properly.
DeleteIf other activity is in focus, you can take snapshot from the same activity. right?