简体   繁体   中英

Updating Robotium .jar file

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

i am using robotium-solo-3.4.1.jar

添加robotium jar参考

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 ]

在此输入图像描述

i hope this will help you. Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM