Skip to content

Commit 80c7b1b

Browse files
authored
just return missing methods (#133)
1 parent a1b7591 commit 80c7b1b

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

lib/appium_lib_core/patch.rb

+1-5
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,10 @@ class Selenium::WebDriver::Element
2929
# e.resource_id # call `e.attribute "resource-id"`
3030
#
3131
def method_missing(method_name)
32-
white_list = [:content_desc, :long_clickable, :resource_id, :selection_start, :selection_end]
33-
attribute_name = white_list.include?(method_name) ? method_name.to_s.tr('_', '-') : method_name
34-
3532
ignore_list = [:to_hash]
36-
3733
return if ignore_list.include? method_name
3834

39-
respond_to?(method_name) ? attribute(attribute_name) : super
35+
respond_to?(method_name) ? attribute(method_name.to_s.tr('_', '-')) : super
4036
end
4137

4238
def respond_to_missing?(*)

test/functional/android/webdriver/w3c_actions_test.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ def test_tap
4343
.pointer_down(:left)
4444
.move_to_location(0, rect.y - rect.height)
4545
.release.perform
46-
assert rect.y < el.rect.y
46+
assert rect.y > el.rect.y
4747

4848
el = @@core.wait { @@driver.find_element(:accessibility_id, 'ImageButton') }
49-
assert_equal 'ImageButton', el.name
49+
assert_equal 'ImageButton', el.text
5050
end
5151
end
5252
end

0 commit comments

Comments
 (0)