public class MobileDeviceUtils extends Object
| Constructor and Description |
|---|
MobileDeviceUtils(MobileDriver uiDriver) |
| Modifier and Type | Method and Description |
|---|---|
void |
copyFileFrom(String deviceFilePath,
String localFilePath) |
void |
copyFileTo(String localFilePath,
String deviceFilePath) |
void |
createDirectory(String directoryPath) |
void |
deleteDirectory(String directoryPath,
boolean recursively) |
void |
deleteFile(String filePath) |
IProcessExecutor |
executeAdbCommand(String[] commandArguments,
boolean verifyExitCode) |
String |
getMD5Sum(String filePath) |
boolean |
isAdbOnWindows() |
FileInfo[] |
listFiles(String path) |
public MobileDeviceUtils(MobileDriver uiDriver)
public FileInfo[] listFiles(String path)
path - a path on the mobile device. It can be a directory or file (if you want to check
for specific file existence)
FileInfo array with all the files and folders from the target pathpublic String getMD5Sum(String filePath)
filePath - file absolute path
public void deleteDirectory(String directoryPath, boolean recursively)
directoryPath - the directory for deletionrecursively - whether to delete the internal directories recursively
Note for iOS: You can specify relative directory path too, by skipping the root slash '/' at the beginning
and pass the path relative to the application data folderpublic void deleteFile(String filePath)
filePath - the file for deletion
Note for iOS: You can specify relative file path too, by skipping the root slash '/' at the beginning
and pass the path relative to the application data folderpublic void createDirectory(String directoryPath)
directoryPath - the directory for creationpublic void copyFileTo(String localFilePath, String deviceFilePath)
localFilePath - local file pathdeviceFilePath - file path on the devicepublic void copyFileFrom(String deviceFilePath, String localFilePath)
deviceFilePath - file path on the devicelocalFilePath - local file pathpublic boolean isAdbOnWindows()
public IProcessExecutor executeAdbCommand(String[] commandArguments, boolean verifyExitCode)
Copyright © 2017 Axway Software. All rights reserved.