Module: Appium::Core::Base::Device::ScreenRecord::Command
- Defined in:
- lib/appium_lib_core/common/device/screen_record.rb
Instance Method Summary collapse
- #stop_and_save_recording_screen(file_path) ⇒ Object
- #stop_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', file_field_name: nil, form_fields: nil, headers: nil) ⇒ Object
Instance Method Details
#stop_and_save_recording_screen(file_path) ⇒ Object
72 73 74 75 |
# File 'lib/appium_lib_core/common/device/screen_record.rb', line 72 def stop_and_save_recording_screen(file_path) base64data = execute(:stop_recording_screen, {}, {}) File.open(file_path, 'wb') { |f| f << Base64.decode64(base64data) } end |
#stop_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', file_field_name: nil, form_fields: nil, headers: nil) ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/appium_lib_core/common/device/screen_record.rb', line 60 def stop_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', file_field_name: nil, form_fields: nil, headers: nil) option = ::Appium::Core::Base::Device::ScreenRecord.new( remote_path: remote_path, user: user, pass: pass, method: method, file_field_name: file_field_name, form_fields: form_fields, headers: headers ).upload_option params = option.empty? ? {} : { options: option } execute(:stop_recording_screen, {}, params) end |