0

I have been using Robotium 3.3, but saw that a method has been added about a week ago, that will allow the user to input a name for any screenshots that are taken using solo.takeScreenshot(String name), however, I'm not sure how to get this method to work. I have tried to download the updated file from github, then create a java project with the downloaded file, then export that project to a .jar file, but I am not having any luck getting that method to work. Here is a link to the method I'm talking about. If anyone could offer any help or direction, that would be great!

Link: https://github.com/jayway/robotium/blob/master/robotium-solo/src/main/java/com/jayway/android/robotium/solo/Solo.java

BlackHatSamurai
  • 23,275
  • 22
  • 95
  • 156

1 Answers1

2

i am using robotium-solo-3.4.1.jar

add robotium jar reference

i use this code :

int i=1;

SimpleDateFormat sdf = new SimpleDateFormat("ddMMyyyyHHmmss");
String currentDateandTime = sdf.format(new Date());

solo.takeScreenshot(currentDateandTime+"_1"+i);

and i get images like this, [ /sdcard/Robotium-Screenshots/05092012180241_1.jpg ]

enter image description here

i hope this will help you. Thanks.

VISHAL VIRADIA
  • 1,388
  • 1
  • 15
  • 34