首页 > 技术文章 > Appium命令-Files

muxs 2021-08-25 15:04 原文

Push File

将文件上传到设备指定位置

dest_path = '/data/local/tmp/test_push_file.txt'
data = bytes('This is the contents of the file to push to the device.', 'utf-8')
self.driver.push_file(dest_path, base64.b64encode(data).decode('utf-8'))

Pull File

从设备的文件系统中拉取指定文件

file_base64 = self.driver.pull_file('/path/to/device/foo.bar');

 

Pull Folder

folder_base64 = self.driver.pull_folder('/path/to/device/foo.bar');

推荐阅读