module Appium::Android::Command

def shell(command, arguments)

Parameters:
  • arguments (Array) -- Arguments for the adb command
  • command (String) -- Command for "adb shell"
def shell(command, arguments)
  args = { command: command, args: arguments }
  # --relaxed-security
  @driver.execute_script 'mobile: shell', args
end

def start_logs_broadcast(logcat_file = 'logcat.log')

Parameters:
  • logcat_file (String) -- A file path to write messages from a logcat WebSocket client
def start_logs_broadcast(logcat_file = 'logcat.log')
  @driver.execute_script 'mobile: startLogsBroadcast'
  socket_url = "ws://#{URI.parse(server_url).host}:#{@core.port}/ws/session/#{@driver.session_id}/appium/device/logcat"
  @logcat_client = ::Appium::Common::Command::WsLogcat.new(url: socket_url, output_file: logcat_file)
end

def stop_logs_broadcast


stop_logs_broadcast #=> nil

@example

Stop Android logcat broadcast websocket
def stop_logs_broadcast
  @logcat_client.close
  @driver.execute_script 'mobile: stopLogsBroadcast'
end