File tree 4 files changed +9
-9
lines changed
4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ def patch_webdriver_element
8
8
Selenium ::WebDriver ::Element . class_eval do
9
9
# Cross platform way of entering text into a textfield
10
10
def type ( text )
11
- self . send_keys text
11
+ send_keys text
12
12
end
13
13
end
14
14
end
Original file line number Diff line number Diff line change @@ -10,14 +10,14 @@ class Selenium::WebDriver::Element
10
10
#
11
11
# Fixes NoMethodError: undefined method `value' for Selenium::WebDriver::Element
12
12
def value
13
- self . attribute :value
13
+ attribute :value
14
14
end
15
15
16
16
# Returns the name attribute
17
17
#
18
18
# Fixes NoMethodError: undefined method `name' for Selenium::WebDriver::Element
19
19
def name
20
- self . attribute :name
20
+ attribute :name
21
21
end
22
22
23
23
# For use with mobile tap.
Original file line number Diff line number Diff line change @@ -107,10 +107,10 @@ def swipe(opts)
107
107
end_y = opts . fetch :end_y , 0
108
108
duration = opts [ :duration ]
109
109
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
114
114
self
115
115
end
116
116
Original file line number Diff line number Diff line change @@ -9,13 +9,13 @@ def patch_webdriver_element
9
9
# Enable access to iOS accessibility label
10
10
# accessibility identifier is supported as 'name'
11
11
def label
12
- self . attribute ( 'label' )
12
+ attribute ( 'label' )
13
13
end
14
14
15
15
# Cross platform way of entering text into a textfield
16
16
def type ( text )
17
17
# type
18
- $driver. execute_script %(au.getElement('#{ self . ref } ').setValue('#{ text } ');)
18
+ $driver. execute_script %(au.getElement('#{ ref } ').setValue('#{ text } ');)
19
19
end # def type
20
20
end # Selenium::WebDriver::Element.class_eval
21
21
end # def patch_webdriver_element
You can’t perform that action at this time.
0 commit comments