class Appium::Core::Base::Device::ScreenRecord
def initialize(remote_path: nil, user: nil, pass: nil, method: 'PUT',
def initialize(remote_path: nil, user: nil, pass: nil, method: 'PUT', file_field_name: nil, form_fields: nil, headers: nil, force_restart: nil) @upload_option = if remote_path.nil? {} else unless METHOD.member?(method.to_s.upcase) raise ::Appium::Core::Error::ArgumentError, 'method should be POST or PUT' end option = {} option[:remotePath] = remote_path option[:user] = user unless user.nil? option[:pass] = pass unless pass.nil? option[:method] = method option[:fileFieldName] = file_field_name unless file_field_name.nil? option[:formFields] = form_fields unless form_fields.nil? option[:headers] = headers unless headers.nil? option end return if force_restart.nil? unless [true, false].member?(force_restart) raise ::Appium::Core::Error::ArgumentError, 'force_restart should be true or false' end @upload_option[:forceRestart] = force_restart end