Skip to content

Commit

Permalink
docs: modify yardoc
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Jan 29, 2025
1 parent 07fe171 commit 2752573
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 30 deletions.
3 changes: 2 additions & 1 deletion lib/appium_lib_core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ module Appium
# @param [Hash] hash Hash value to make symbolise
#
# @example
# opts = Appium.symbolize_keys(opts)
#
# opts = Appium.symbolize_keys(opts)
#
def self.symbolize_keys(hash, nested: false, enable_deprecation_msg: true)
# FIXME: As https://github.com/appium/ruby_lib/issues/945, we must remove this implicit string to symbol.
Expand Down
7 changes: 2 additions & 5 deletions lib/appium_lib_core/android/device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,14 @@ module Device
#

# @!method location=
# Set the location of the device.
#
# @param [::Appium::Location] location Set the location.
# Set the [::Appium::Location] of the device.
#
# @example
#
# driver.location = ::Appium::Location.new(10, 10, 10)
#

# @!method set_location
# @!method set_location(latitude, longitude, altitude, speed: nil, satellites: nil)
# Set the location of the device.
#
# @param [String, Number] latitude Set the latitude.
Expand All @@ -145,7 +143,6 @@ module Device
# in meters/second @since Appium 1.21.0 and in knots for emulators @since Appium 1.22.0.
# @param [String, Number] satellites Sets the count of geo satellites being tracked in range 1..12 @since Appium 1.22.0.
# This number is respected on Emulators.
# @param [::Appium::Location]
#
# @example
#
Expand Down
4 changes: 2 additions & 2 deletions lib/appium_lib_core/common/base/bridge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def browser
# Appium only.
# Attach to an existing session.
#
# @param [String] The session id to attach to.
# @param [String] session_id The session id to attach to.
# @param [String] platform_name The platform name to keep in the dummy capabilities
# @param [String] platform_name The automation name to keep in the dummy capabilities
# @param [String] automation_name The automation name to keep in the dummy capabilities
# @return [::Appium::Core::Base::Capabilities]
#
# @example
Expand Down
12 changes: 6 additions & 6 deletions lib/appium_lib_core/common/base/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -625,14 +625,14 @@ def background_app(duration = 0)
#
# @param [String] path The absolute local path or remote http URL to an .ipa or .apk file,
# or a .zip containing one of these.
# @param [Boolean] replace Only for Android. Whether to reinstall/upgrade the package if it is already present
# @option [Boolean] replace Only for Android. Whether to reinstall/upgrade the package if it is already present
# on the device under test. +true+ by default
# @param [Integer] timeout Only for Android. How much time to wait for the installation to complete.
# @option [Integer] timeout Only for Android. How much time to wait for the installation to complete.
# 60000ms by default.
# @param [Boolean] allow_test_packages Only for Android. Whether to allow installation of packages marked as test
# @option [Boolean] allow_test_packages Only for Android. Whether to allow installation of packages marked as test
# in the manifest. +false+ by default
# @param [Boolean] use_sdcard Only for Android. Whether to use the SD card to install the app. +false+ by default
# @param [Boolean] grant_permissions Only for Android. whether to automatically grant application permissions
# @option [Boolean] use_sdcard Only for Android. Whether to use the SD card to install the app. +false+ by default
# @option [Boolean] grant_permissions Only for Android. whether to automatically grant application permissions
# on Android 6+ after the installation completes. +false+ by default
#
# Other parameters such as https://github.com/appium/appium-xcuitest-driver#mobile-installapp also can be set.
Expand Down Expand Up @@ -1014,7 +1014,7 @@ def execute_driver(script: '', type: 'webdriverio', timeout_ms: nil)

# Convert vanilla element response to ::Appium::Core::Element
#
# @param [Hash] id The id which can get as a response from server
# @param [Hash] response_id id The id which can get as a response from server
# @return [::Appium::Core::Element]
#
# @example
Expand Down
1 change: 0 additions & 1 deletion lib/appium_lib_core/common/base/has_location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def location=(location)
# in meters/second @since Appium 1.21.0 and in knots for emulators @since Appium 1.22.0.
# @param [String, Number] satellites Sets the count of geo satellites being tracked in range 1..12 @since Appium 1.22.0.
# This number is respected on Emulators.
# @param [::Appium::Location]
#
# @example
#
Expand Down
14 changes: 1 addition & 13 deletions lib/appium_lib_core/common/base/search_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,7 @@ module SearchContext
# Can be fully qualified, or simple, and simple defaults to <code>androidx.test.espresso.matcher</code> package
# (e.g.: <code>class=CursorMatchers</code> fully qualified is <code>class=androidx.test.espresso.matcher.CursorMatchers</code>
#
# See example how to send viewmatcher and datamatcher in Ruby client
#
#
# @overload find_element(how, what)
# @param [Symbol, String] how The method to find the element by
# @param [String] what The locator to use
#
# @overload find_element(opts)
# @param [Hash] opts Find options
# @option opts [Symbol] :how Key named after the method to find the element by, containing the locator
# @return [Element]
# @raise [Error::NoSuchElementError] if the element doesn't exist
# See test code in the client repository to see how to send viewmatcher and datamatcher in Ruby client
#
# @example Find element with each keys
#
Expand Down Expand Up @@ -101,7 +90,6 @@ module SearchContext
# e.tag_name #=> "XCUIElementTypeStaticText"
#
# rubocop:enable Layout/LineLength

APPIUM_EXTRA_FINDERS = {
accessibility_id: 'accessibility id',
image: '-image',
Expand Down
2 changes: 1 addition & 1 deletion lib/appium_lib_core/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def self.for(opts = {})
# an endpoint to get running session's capabilities.
#
#
# @param [String] The session id to attach to.
# @param [String] session_id The session id to attach to.
# @param [String] url The WebDriver URL to attach to with the session_id.
# @param [String] automation_name The platform name to keep in the dummy capabilities
# @param [String] platform_name The automation name to keep in the dummy capabilities
Expand Down
2 changes: 1 addition & 1 deletion lib/appium_lib_core/mac2/device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module Device
# rubocop:disable Layout/LineLength

# @since Appium 1.20.0
# @!method start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', file_field_name: nil, form_fields: nil, headers: nil, force_restart: nil, fps: nil, preset: nil, video_filter: nil, enable_capture_clicks: nil, enable_cursor_capture: nil, device_id: nil)
# @!method start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', file_field_name: nil, form_fields: nil, headers: nil, force_restart: nil, fps: nil, preset: nil, video_filter: nil, enable_capture_clicks: nil, enable_cursor_capture: nil, device_id: nil, time_limit: nil)
#
# Record the display of devices running iOS Simulator since Xcode 9 or real devices since iOS 11
# (ffmpeg utility is required: 'brew install ffmpeg').
Expand Down

0 comments on commit 2752573

Please sign in to comment.