lib/appium_lib/driver.rb in appium_lib-9.3.6 vs lib/appium_lib/driver.rb in appium_lib-9.3.7
- old
+ new
@@ -633,15 +633,15 @@
@driver.manage.timeouts.implicit_wait = 0
end
# Set implicit wait. Default to @default_wait.
#
- # ```ruby`
+ # ```ruby
# set_wait 2
# set_wait # @default_wait
#
- # ````
+ # ```
#
# @param timeout [Integer] the timeout in seconds
# @return [void]
def set_wait(timeout = nil)
timeout = @default_wait if timeout.nil?
@@ -686,23 +686,44 @@
# @return [Object]
def execute_script(script, *args)
@driver.execute_script script, *args
end
- # Calls @driver.find_elements
+ # Calls @driver.find_elements_with_appium
#
+ # ```
+ # @driver = Appium::Driver.new()
+ # @driver.find_elements :predicate, yyy
+ # ```
+ #
+ # If you call `Appium.promote_appium_methods`, you can call `find_elements` directly.
+ #
+ # ```
+ # @driver = Appium::Driver.new()
+ # @driver.find_elements :predicate, yyy
+ # ```
+ #
+ # If you call `Appium.promote_appium_methods`, you can call `find_elements` directly.
+ #
# @param [*args] args The args to use
# @return [Array<Element>] Array is empty when no elements are found.
def find_elements(*args)
- @driver.find_elements_with_appium(*args)
+ @driver.find_elements(*args)
end
- # Calls @driver.find_elements
+ # Calls @driver.find_element
#
+ # ```
+ # @driver = Appium::Driver.new()
+ # @driver.find_element :accessibility_id, zzz
+ # ```
+ #
+ # If you call `Appium.promote_appium_methods`, you can call `find_element` directly.
+ #
# @param [*args] args The args to use
# @return [Element]
def find_element(*args)
- @driver.find_element_with_appium(*args)
+ @driver.find_element(*args)
end
# Calls @driver.set_location
#
# @note This method does not work on real devices.