@@ -182,10 +182,12 @@ public static void clearData(String packageName) throws Exception {
182182 *
183183 * @param Filename
184184 * is the path where the file will be saved.
185+ * @throws RipException
186+ * @throws IOException
185187 * @throws Exception
186188 * if filename is wrong, not valid directory
187189 */
188- public static void takeScreenshot (String filename ) throws Exception {
190+ public static void takeScreenshot (String filename ) throws IOException , RipException {
189191
190192 String example = "/sdcard/screen.png" ;
191193
@@ -203,10 +205,12 @@ public static void takeScreenshot(String filename) throws Exception {
203205 * must be replaced with the path of the file in the device
204206 * @param LocalFilePath
205207 * is the path where the file will be stored in the computer.
208+ * @throws RipException
209+ * @throws IOException
206210 * @throws Exception
207211 * if any path is wrong
208212 */
209- public static void pullFile (String remotePath , String localPath ) throws Exception {
213+ public static void pullFile (String remotePath , String localPath ) throws IOException , RipException {
210214
211215 String remotePathEx = "/sdcard/sreen.png" ;
212216 String localPathEx = "screenPull.png" ;
@@ -229,10 +233,12 @@ public static void pullFile(String remotePath, String localPath) throws Exceptio
229233 * is the path where the file will be stored in the computer.
230234 * @param Filename
231235 * is the path where the file will be saved.
236+ * @throws RipException
237+ * @throws IOException
232238 * @throws Exception
233239 * if filename is wrong, not valid directory or any path is wrong
234240 */
235- public static void pullScreenshot (String filename , String remotePath , String localPath ) throws Exception {
241+ public static void pullScreenshot (String filename , String remotePath , String localPath ) throws IOException , RipException {
236242
237243 String filenameEx = "/sdcard/screen2.png" ;
238244 String remotePathEx = "/sdcard/screen2.png" ;
@@ -377,8 +383,10 @@ public static void scroll(String coordX1, String coordY1, String coordX2, String
377383 /**
378384 * Simulates the effect of touching back soft button, return to the last
379385 * activity. 4 is KEYCODE_BACK
386+ * @throws RipException
387+ * @throws IOException
380388 */
381- public static void goBack () throws Exception {
389+ public static void goBack () throws IOException , RipException {
382390
383391 List <String > commands = Arrays .asList ("adb" , "shell" , "input" , "keyevent" , "4" );
384392 executeProcess (commands , "GO BACK" , null , null );
@@ -388,8 +396,10 @@ public static void goBack() throws Exception {
388396 /**
389397 * Simulates the effect of touching home soft button, return home. 3 is
390398 * KEYCODE_HOME
399+ * @throws RipException
400+ * @throws IOException
391401 */
392- public static void goHome () throws Exception {
402+ public static void goHome () throws IOException , RipException {
393403
394404 List <String > commands = Arrays .asList ("adb" , "shell" , "input" , "keyevent" , "3" );
395405 executeProcess (commands , "GO HOME" , null , null );
@@ -1333,5 +1343,4 @@ public static void readWebViewConsole() throws InterruptedException {
13331343 e .printStackTrace ();
13341344 }
13351345 }
1336-
13371346}
0 commit comments