lib/appium_lib/ios/xcuitest/command/gestures.rb in appium_lib-9.18.0 vs lib/appium_lib/ios/xcuitest/command/gestures.rb in appium_lib-10.0.0
- old
+ new
@@ -26,16 +26,12 @@
# to which the scrolling should be performed. Has no effect if element is not a container
#
# ```ruby
# scroll direction: "down"
# ```
- def scroll(direction:, # rubocop:disable Metrics/ParameterLists
- distance: nil,
- name: nil,
- element: nil,
- to_visible: nil,
- predicate_string: nil)
+ # rubocop:disable Metrics/ParameterLists
+ def scroll(direction:, distance: nil, name: nil, element: nil, to_visible: nil, predicate_string: nil)
return 'Set "up", "down", "left" or "right" for :direction' unless %w(up down left right).include?(direction)
args = { direction: direction }
args[:element] = element.ref if element
args[:distance] = distance if distance
@@ -43,9 +39,10 @@
args[:toVisible] = to_visible if to_visible
args[:predicateString] = predicate_string if predicate_string
@driver.execute_script 'mobile: scroll', args
end
+ # rubocop:enable Metrics/ParameterLists
# @param scale [scale] X tap coordinate of type float. Mandatory parameter
# @param velocity [float] Y tap coordinate of type float. Mandatory parameter
# @option opts [Element] :element Element id to long tap on.
#