Sha256: 3da6d6d4c0b0f6a06338157cd4df025db3f166b3d5bdc0e896064855e293930d

Contents?: true

Size: 1.17 KB

Versions: 4

Compression:

Stored size: 1.17 KB

Contents

require_relative 'command/pasteboard'
require_relative 'command/gestures'
require_relative 'command/source'
require_relative 'command/multi_app_handler'

module Appium
  module Ios
    module Xcuitest
      module Command
        # Starts iOS syslog broadcast websocket
        #
        # @param [String] syslog_file A file path to write messages from a syslog WebSocket client
        #
        # @example
        #
        #   start_logs_broadcast 'outputfile.log' #=> #<Appium::Android::Command::WsLogcat:...>
        #
        def start_logs_broadcast(syslog_file = 'syslog.log')
          @driver.execute_script 'mobile: startLogsBroadcast'

          socket_url = "ws://#{URI.parse(server_url).host}:#{@core.port}/ws/session/#{@driver.session_id}/appium/device/syslog"
          @logcat_client = ::Appium::Common::Command::WsLogcat.new(url: socket_url, output_file: syslog_file)
        end

        # Stop iOS syslog broadcast websocket
        #
        # @example
        #
        #   stop_logs_broadcast #=> nil
        #
        def stop_logs_broadcast
          @logcat_client.close

          @driver.execute_script 'mobile: stopLogsBroadcast'
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
appium_lib-9.14.1 lib/appium_lib/ios/xcuitest/command.rb
appium_lib-9.14.0 lib/appium_lib/ios/xcuitest/command.rb
appium_lib-9.13.0 lib/appium_lib/ios/xcuitest/command.rb
appium_lib-9.12.1 lib/appium_lib/ios/xcuitest/command.rb