Sha256: 40fb1533e73caf439269c762d47a2606a0f9ebb9d194737412ba7fc1307383e1

Contents?: true

Size: 1.31 KB

Versions: 10

Compression:

Stored size: 1.31 KB

Contents

# frozen_string_literal: true

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

module Appium
  module Core
    class Logs
      def initialize(bridge)
        @bridge = bridge
      end

      # @param [String|Hash] type You can get particular type's logs.
      # @return [[Selenium::WebDriver::LogEntry]] A list of logs data.
      #
      # @example
      #
      #   @driver.logs.get "syslog" # []
      #   @driver.logs.get :syslog # []
      #
      def get(type)
        @bridge.log type
      end

      # Get a list of available log types
      #
      # @return [[Hash]] A list of available log types.
      # @example
      #
      #   @driver.logs.available_types # [:syslog, :crashlog, :performance]
      #
      def available_types
        @bridge.available_log_types
      end
    end
  end # module Core
end # module Appium

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
appium_lib_core-3.2.3 lib/appium_lib_core/common/log.rb
appium_lib_core-3.2.2 lib/appium_lib_core/common/log.rb
appium_lib_core-3.2.1 lib/appium_lib_core/common/log.rb
appium_lib_core-3.2.0 lib/appium_lib_core/common/log.rb
appium_lib_core-3.1.3 lib/appium_lib_core/common/log.rb
appium_lib_core-3.1.2 lib/appium_lib_core/common/log.rb
appium_lib_core-3.1.1 lib/appium_lib_core/common/log.rb
appium_lib_core-3.1.0 lib/appium_lib_core/common/log.rb
appium_lib_core-3.0.4 lib/appium_lib_core/common/log.rb
appium_lib_core-3.0.3 lib/appium_lib_core/common/log.rb