Class: Appium::Core::Logs

Inherits:
Object
  • Object
show all
Defined in:
lib/appium_lib_core/common/log.rb

Instance Method Summary collapse

Constructor Details

#initialize(bridge) ⇒ Logs

Returns a new instance of Logs.



4
5
6
# File 'lib/appium_lib_core/common/log.rb', line 4

def initialize(bridge)
  @bridge = bridge
end

Instance Method Details

#available_types[Hash]

Get a list of available log types

Examples:

Appium::Core::Logs.new(driver).available_types #=>  [:syslog, :crashlog, :performance]

Returns:

  • ([Hash])

    A list of available log types.



25
26
27
# File 'lib/appium_lib_core/common/log.rb', line 25

def available_types
  @bridge.available_types
end

#get(type) ⇒ [Selenium::WebDriver::LogEntry]

Returns A list of logs data.

Examples:

Appium::Core::Logs.new(driver).get("syslog") #=> [[Selenium::WebDriver::LogEntry]]
Appium::Core::Logs.new(driver).get(:syslog)  #=> [[Selenium::WebDriver::LogEntry]]

Parameters:

  • type (String|Hash)

    You can get particular type’s logs.

Returns:

  • ([Selenium::WebDriver::LogEntry])

    A list of logs data.



15
16
17
# File 'lib/appium_lib_core/common/log.rb', line 15

def get(type)
  @bridge.get type
end