Skip to content

Commit 86b378e

Browse files
Add pull_folder support
1 parent 0b3e0cf commit 86b378e

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

ios_tests/appium.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[caps]
22
platformName = "ios"
3+
deviceName ="iPhone Simulator"
34
app = "./UICatalog.app"
45

56
[appium_lib]

lib/appium_lib/device/device.rb

+16
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ module Device
9393
# pull_file 'Shenanigans.app/some/file' #=> Get 'some/file' from the install location of Shenanigans.app
9494
# ```
9595

96+
# @!method pull_folder
97+
# Retrieve a folder from the device.
98+
# @param path (String) absolute path to the folder
99+
#
100+
# ```ruby
101+
# pull_folder '/data/local/tmp' #=> Get the folder at that path
102+
# ```
103+
96104
# @!method end_coverage
97105
# Android only; Ends the test coverage and writes the results to the given path on device.
98106
# @param path (String) Path on the device to write too.
@@ -215,6 +223,14 @@ def pull_file(path)
215223
end
216224
end
217225

226+
# TODO TEST ME
227+
add_endpoint_method(:pull_folder, 'session/:session_id/appium/device/pull_folder') do
228+
def pull_folder(path)
229+
data = execute :pull_folder, {}, path: path
230+
Base64.decode64 data
231+
end
232+
end
233+
218234
# TODO TEST ME
219235
add_endpoint_method(:end_coverage, 'session/:session_id/appium/app/end_test_coverage') do
220236
def end_coverage(path, intent)

0 commit comments

Comments
 (0)