Skip to content

Commit f5fd8cf

Browse files
committed
Rubocop - Style/RedundantSelf
1 parent 4444168 commit f5fd8cf

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

lib/appium_lib/android/patch.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def patch_webdriver_element
88
Selenium::WebDriver::Element.class_eval do
99
# Cross platform way of entering text into a textfield
1010
def type(text)
11-
self.send_keys text
11+
send_keys text
1212
end
1313
end
1414
end

lib/appium_lib/common/patch.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ class Selenium::WebDriver::Element
1010
#
1111
# Fixes NoMethodError: undefined method `value' for Selenium::WebDriver::Element
1212
def value
13-
self.attribute :value
13+
attribute :value
1414
end
1515

1616
# Returns the name attribute
1717
#
1818
# Fixes NoMethodError: undefined method `name' for Selenium::WebDriver::Element
1919
def name
20-
self.attribute :name
20+
attribute :name
2121
end
2222

2323
# For use with mobile tap.

lib/appium_lib/device/touch_actions.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ def swipe(opts)
107107
end_y = opts.fetch :end_y, 0
108108
duration = opts[:duration]
109109

110-
self.press x: start_x, y: start_y
111-
self.wait(duration) if duration
112-
self.move_to x: end_x, y: end_y
113-
self.release
110+
press x: start_x, y: start_y
111+
wait(duration) if duration
112+
move_to x: end_x, y: end_y
113+
release
114114
self
115115
end
116116

lib/appium_lib/ios/patch.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ def patch_webdriver_element
99
# Enable access to iOS accessibility label
1010
# accessibility identifier is supported as 'name'
1111
def label
12-
self.attribute('label')
12+
attribute('label')
1313
end
1414

1515
# Cross platform way of entering text into a textfield
1616
def type(text)
1717
# type
18-
$driver.execute_script %(au.getElement('#{self.ref}').setValue('#{text}');)
18+
$driver.execute_script %(au.getElement('#{ref}').setValue('#{text}');)
1919
end # def type
2020
end # Selenium::WebDriver::Element.class_eval
2121
end # def patch_webdriver_element

0 commit comments

Comments
 (0)