appium_lib_core 4.1.0 → 9.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +352 -270
  3. data/README.md +68 -16
  4. data/Rakefile +8 -20
  5. data/Steepfile +11 -0
  6. data/appium_lib_core.gemspec +13 -15
  7. data/bin/console +0 -4
  8. data/lib/appium_lib_core/android/device/auth_finger_print.rb +4 -1
  9. data/lib/appium_lib_core/android/device/clipboard.rb +4 -2
  10. data/lib/appium_lib_core/android/device/emulator.rb +11 -5
  11. data/lib/appium_lib_core/android/device/network.rb +10 -0
  12. data/lib/appium_lib_core/android/device/performance.rb +3 -0
  13. data/lib/appium_lib_core/android/device/screen.rb +5 -1
  14. data/lib/appium_lib_core/android/device.rb +83 -20
  15. data/lib/appium_lib_core/common/base/bridge.rb +238 -95
  16. data/lib/appium_lib_core/common/base/capabilities.rb +21 -8
  17. data/lib/appium_lib_core/common/{command/mjsonwp.rb → base/device_ime.rb} +33 -12
  18. data/lib/appium_lib_core/common/base/driver.rb +263 -334
  19. data/lib/appium_lib_core/common/base/driver_settings.rb +51 -0
  20. data/lib/appium_lib_core/common/base/has_location.rb +80 -0
  21. data/lib/appium_lib_core/common/base/has_network_connection.rb +56 -0
  22. data/lib/appium_lib_core/common/base/http_default.rb +22 -38
  23. data/lib/appium_lib_core/{ios/uiautomation/bridge.rb → common/base/remote_status.rb} +9 -8
  24. data/lib/appium_lib_core/common/base/rotable.rb +62 -0
  25. data/lib/appium_lib_core/common/base/screenshot.rb +10 -10
  26. data/lib/appium_lib_core/common/base/search_context.rb +98 -172
  27. data/lib/appium_lib_core/common/base.rb +1 -5
  28. data/lib/appium_lib_core/common/command.rb +244 -4
  29. data/lib/appium_lib_core/common/device/app_management.rb +2 -26
  30. data/lib/appium_lib_core/common/device/context.rb +1 -5
  31. data/lib/appium_lib_core/common/device/image_comparison.rb +27 -10
  32. data/lib/appium_lib_core/common/device/keyevent.rb +4 -4
  33. data/lib/appium_lib_core/common/device/{touch_actions.rb → orientation.rb} +6 -10
  34. data/lib/appium_lib_core/common/device/screen_record.rb +8 -2
  35. data/lib/appium_lib_core/common/error.rb +5 -5
  36. data/lib/appium_lib_core/common/log.rb +5 -4
  37. data/lib/appium_lib_core/common/wait.rb +38 -6
  38. data/lib/appium_lib_core/device.rb +3 -9
  39. data/lib/appium_lib_core/driver.rb +207 -164
  40. data/lib/appium_lib_core/{patch.rb → element.rb} +64 -26
  41. data/lib/appium_lib_core/ios/device/clipboard.rb +4 -2
  42. data/lib/appium_lib_core/ios/xcuitest/device.rb +2 -0
  43. data/lib/appium_lib_core/{common/base/command.rb → mac2/bridge.rb} +9 -8
  44. data/lib/appium_lib_core/mac2/device/screen.rb +48 -0
  45. data/lib/appium_lib_core/mac2/device.rb +92 -0
  46. data/lib/appium_lib_core/{ios.rb → mac2.rb} +2 -5
  47. data/lib/appium_lib_core/support/event_firing_bridge.rb +57 -0
  48. data/lib/appium_lib_core/version.rb +2 -2
  49. data/lib/appium_lib_core.rb +23 -10
  50. data/rbs_collection.lock.yaml +252 -0
  51. data/rbs_collection.yaml +15 -0
  52. data/sig/gems/selenium/abstract_event_listener.rbs +8 -0
  53. data/sig/gems/selenium/capabilities.rbs +8 -0
  54. data/sig/gems/selenium/common.rbs +10 -0
  55. data/sig/gems/selenium/default.rbs +10 -0
  56. data/sig/gems/selenium/driver.rbs +7 -0
  57. data/sig/gems/selenium/has_session_id.rbs +8 -0
  58. data/sig/gems/selenium/has_web_storage.rbs +8 -0
  59. data/sig/gems/selenium/uploads_files.rbs +8 -0
  60. data/sig/lib/appium_lib_core/common/base/capabilities.rbs +9 -0
  61. data/sig/lib/appium_lib_core/common/base/driver.rbs +167 -0
  62. data/sig/lib/appium_lib_core/common/base/driver_settings.rbs +15 -0
  63. data/sig/lib/appium_lib_core/common/base/has_location.rbs +13 -0
  64. data/sig/lib/appium_lib_core/common/base/has_network_connection.rbs +19 -0
  65. data/sig/lib/appium_lib_core/common/base/http_default.rbs +38 -0
  66. data/sig/lib/appium_lib_core/common/base/platform.rbs +7 -0
  67. data/sig/lib/appium_lib_core/common/base/remote_status.rbs +9 -0
  68. data/sig/lib/appium_lib_core/common/base/rotable.rbs +17 -0
  69. data/sig/lib/appium_lib_core/common/base/screenshot.rbs +19 -0
  70. data/sig/lib/appium_lib_core/common/device/battery_status.rbs +13 -0
  71. data/sig/lib/appium_lib_core/common/wait.rbs +31 -0
  72. data/sig/lib/appium_lib_core/device.rbs +21 -0
  73. data/sig/lib/appium_lib_core/driver.rbs +200 -0
  74. data/sig/lib/appium_lib_core/ios/xcuitest/device/battery.rbs +15 -0
  75. data/sig/lib/appium_lib_core/version.rbs +7 -0
  76. data/sig/lib/appium_lib_core.rbs +8 -0
  77. metadata +88 -111
  78. data/.github/ISSUE_TEMPLATE/issue-report.md +0 -29
  79. data/.github/contributing.md +0 -26
  80. data/.github/issue_template.md +0 -20
  81. data/.github/workflows/unittest.yml +0 -68
  82. data/.gitignore +0 -18
  83. data/.rubocop.yml +0 -58
  84. data/azure-pipelines.yml +0 -15
  85. data/ci-jobs/functional/android_setup.yml +0 -3
  86. data/ci-jobs/functional/ios_setup.yml +0 -7
  87. data/ci-jobs/functional/publish_test_result.yml +0 -18
  88. data/ci-jobs/functional/run_appium.yml +0 -25
  89. data/ci-jobs/functional/start-emulator.sh +0 -26
  90. data/ci-jobs/functional_test.yml +0 -298
  91. data/docs/mobile_command.md +0 -34
  92. data/lib/appium_lib_core/common/base/bridge/mjsonwp.rb +0 -81
  93. data/lib/appium_lib_core/common/base/bridge/w3c.rb +0 -252
  94. data/lib/appium_lib_core/common/command/common.rb +0 -110
  95. data/lib/appium_lib_core/common/command/w3c.rb +0 -56
  96. data/lib/appium_lib_core/common/device/value.rb +0 -52
  97. data/lib/appium_lib_core/common/touch_action/multi_touch.rb +0 -56
  98. data/lib/appium_lib_core/common/touch_action/touch_actions.rb +0 -203
  99. data/lib/appium_lib_core/ios/uiautomation/device.rb +0 -44
  100. data/lib/appium_lib_core/ios/uiautomation/patch.rb +0 -34
  101. data/release_notes.md +0 -816
  102. data/script/commands.rb +0 -200
@@ -47,7 +47,7 @@ module Appium
47
47
  # not available in the default OpenCV installation and have to be enabled manually
48
48
  # before library compilation. The default detector name is 'ORB'.
49
49
  # @param [String] match_func The name of the matching function. The default one is 'BruteForce'.
50
- # @param [String] good_matches_factor The maximum count of "good" matches (e. g. with minimal distances).
50
+ # @param [String, nil] good_matches_factor The maximum count of "good" matches (e. g. with minimal distances).
51
51
  # The default one is nil.
52
52
  # @param [Bool] visualize Makes the endpoint to return an image, which contains the visualized result of
53
53
  # the corresponding picture matching operation. This option is disabled by default.
@@ -65,14 +65,17 @@ module Appium
65
65
  good_matches_factor: nil,
66
66
  visualize: false)
67
67
  unless MATCH_FEATURES[:detector_name].member?(detector_name.to_s)
68
- raise "detector_name should be #{MATCH_FEATURES[:detector_name]}"
68
+ raise ::Appium::Core::Error::ArgumentError, "detector_name should be #{MATCH_FEATURES[:detector_name]}"
69
69
  end
70
70
 
71
71
  unless MATCH_FEATURES[:match_func].member?(match_func.to_s)
72
- raise "match_func should be #{MATCH_FEATURES[:match_func]}"
72
+ raise ::Appium::Core::Error::ArgumentError, "match_func should be #{MATCH_FEATURES[:match_func]}"
73
73
  end
74
74
 
75
- raise "visualize should be #{MATCH_FEATURES[:visualize]}" unless MATCH_FEATURES[:visualize].member?(visualize)
75
+ unless MATCH_FEATURES[:visualize].member?(visualize)
76
+ raise ::Appium::Core::Error::ArgumentError,
77
+ "visualize should be #{MATCH_FEATURES[:visualize]}"
78
+ end
76
79
 
77
80
  options = {}
78
81
  options[:detectorName] = detector_name.to_s.upcase
@@ -94,7 +97,12 @@ module Appium
94
97
  # are supported.
95
98
  # @param [Bool] visualize Makes the endpoint to return an image, which contains the visualized result of
96
99
  # the corresponding picture matching operation. This option is disabled by default.
97
- # @param [Float] threshold [0.5] At what normalized threshold to reject
100
+ # @param [Float, nil] threshold [0.5] At what normalized threshold to reject
101
+ # @param [bool, nil] multiple Whether to enable the support of multiple image occurrences @since Appium 1.21.0.
102
+ # @param [integer, nil] match_neighbour_threshold The pixel distance between matches we consider to be part of
103
+ # the same template match @since Appium 1.21.0.
104
+ # This option is only considered if multiple matches mode is enabled.
105
+ # 10 pixels by default.
98
106
  #
99
107
  # @example
100
108
  # @driver.find_image_occurrence full_image: "image data 1", partial_image: "image data 2"
@@ -102,12 +110,18 @@ module Appium
102
110
  # visual = @@driver.find_image_occurrence full_image: image1, partial_image: image2, visualize: true
103
111
  # File.write 'find_result_visual.png', Base64.decode64(visual['visualization']) # if the image is PNG
104
112
  #
105
- def find_image_occurrence(full_image:, partial_image:, visualize: false, threshold: nil)
106
- raise "visualize should be #{MATCH_TEMPLATE[:visualize]}" unless MATCH_TEMPLATE[:visualize].member?(visualize)
113
+ def find_image_occurrence(full_image:, partial_image:, visualize: false, threshold: nil,
114
+ multiple: nil, match_neighbour_threshold: nil)
115
+ unless MATCH_TEMPLATE[:visualize].member?(visualize)
116
+ raise ::Appium::Core::Error::ArgumentError,
117
+ "visualize should be #{MATCH_TEMPLATE[:visualize]}"
118
+ end
107
119
 
108
120
  options = {}
109
121
  options[:visualize] = visualize
110
122
  options[:threshold] = threshold unless threshold.nil?
123
+ options[:multiple] = multiple unless multiple.nil?
124
+ options[:matchNeighbourThreshold] = match_neighbour_threshold unless match_neighbour_threshold.nil?
111
125
 
112
126
  compare_images(mode: :matchTemplate, first_image: full_image, second_image: partial_image, options: options)
113
127
  end
@@ -128,7 +142,10 @@ module Appium
128
142
  # File.write 'images_similarity_visual.png', Base64.decode64(visual['visualization']) # if the image is PNG
129
143
  #
130
144
  def get_images_similarity(first_image:, second_image:, visualize: false)
131
- raise "visualize should be #{GET_SIMILARITY[:visualize]}" unless GET_SIMILARITY[:visualize].member?(visualize)
145
+ unless GET_SIMILARITY[:visualize].member?(visualize)
146
+ raise ::Appium::Core::Error::ArgumentError,
147
+ "visualize should be #{GET_SIMILARITY[:visualize]}"
148
+ end
132
149
 
133
150
  options = {}
134
151
  options[:visualize] = visualize
@@ -144,13 +161,13 @@ module Appium
144
161
  # +:matchFeatures is by default.
145
162
  # @param [String] first_image An image data. All image formats, that OpenCV library itself accepts, are supported.
146
163
  # @param [String] second_image An image data. All image formats, that OpenCV library itself accepts, are supported.
147
- # @param [Hash] options The content of this dictionary depends on the actual +mode+ value.
164
+ # @param [Hash, nil] options The content of this dictionary depends on the actual +mode+ value.
148
165
  # See the documentation on +appium-support+ module for more details.
149
166
  # @return [Hash] The content of the resulting dictionary depends on the actual +mode+ and +options+ values.
150
167
  # See the documentation on +appium-support+ module for more details.
151
168
  #
152
169
  def compare_images(mode: :matchFeatures, first_image:, second_image:, options: nil)
153
- raise "content_type should be #{MODE}" unless MODE.member?(mode)
170
+ raise ::Appium::Core::Error::ArgumentError, "content_type should be #{MODE}" unless MODE.member?(mode)
154
171
 
155
172
  params = {}
156
173
  params[:mode] = mode
@@ -25,8 +25,8 @@ module Appium
25
25
  end
26
26
 
27
27
  def press_keycode(key, metastate: [], flags: [])
28
- raise ArgumentError, 'flags should be Array' unless flags.is_a? Array
29
- raise ArgumentError, 'metastates should be Array' unless metastate.is_a? Array
28
+ raise ::Appium::Core::Error::ArgumentError, 'flags should be Array' unless flags.is_a? Array
29
+ raise ::Appium::Core::Error::ArgumentError, 'metastates should be Array' unless metastate.is_a? Array
30
30
 
31
31
  args = { keycode: key }
32
32
  args[:metastate] = metastate.reduce(0) { |acc, meta| acc | meta } unless metastate.empty?
@@ -36,8 +36,8 @@ module Appium
36
36
  end
37
37
 
38
38
  def long_press_keycode(key, metastate: [], flags: [])
39
- raise ArgumentError, 'flags should be Array' unless flags.is_a? Array
40
- raise ArgumentError, 'metastates should be Array' unless metastate.is_a? Array
39
+ raise ::Appium::Core::Error::ArgumentError, 'flags should be Array' unless flags.is_a? Array
40
+ raise ::Appium::Core::Error::ArgumentError, 'metastates should be Array' unless metastate.is_a? Array
41
41
 
42
42
  args = { keycode: key }
43
43
  args[:metastate] = metastate.reduce(0) { |acc, meta| acc | meta } unless metastate.empty?
@@ -12,23 +12,19 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require_relative '../touch_action/touch_actions'
16
- require_relative '../touch_action/multi_touch'
17
-
18
15
  module Appium
19
16
  module Core
20
17
  class Base
21
18
  module Device
22
- module TouchActions
23
- def touch_actions(actions)
24
- actions = { actions: [actions].flatten }
25
- execute :touch_actions, {}, actions
19
+ module Orientation
20
+ def screen_orientation=(orientation)
21
+ execute :set_screen_orientation, {}, { orientation: orientation }
26
22
  end
27
23
 
28
- def multi_touch(actions)
29
- execute :multi_touch, {}, actions: actions
24
+ def screen_orientation
25
+ execute :get_screen_orientation
30
26
  end
31
- end # module TouchActions
27
+ end # module Orientation
32
28
  end # module Device
33
29
  end # class Base
34
30
  end # module Core
@@ -30,7 +30,10 @@ module Appium
30
30
  @upload_option = if remote_path.nil?
31
31
  {}
32
32
  else
33
- raise 'method should be POST or PUT' unless METHOD.member?(method.to_s.upcase)
33
+ unless METHOD.member?(method.to_s.upcase)
34
+ raise ::Appium::Core::Error::ArgumentError,
35
+ 'method should be POST or PUT'
36
+ end
34
37
 
35
38
  option = {}
36
39
  option[:remotePath] = remote_path
@@ -45,7 +48,10 @@ module Appium
45
48
 
46
49
  return if force_restart.nil?
47
50
 
48
- raise 'force_restart should be true or false' unless [true, false].member?(force_restart)
51
+ unless [true, false].member?(force_restart)
52
+ raise ::Appium::Core::Error::ArgumentError,
53
+ 'force_restart should be true or false'
54
+ end
49
55
 
50
56
  @upload_option[:forceRestart] = force_restart
51
57
  end
@@ -17,18 +17,18 @@ module Appium
17
17
  module Error
18
18
  class CoreError < StandardError; end
19
19
 
20
- # Capability related errors
21
- class NoCapabilityError < CoreError; end
22
- class CapabilityStructureError < CoreError; end
23
-
24
20
  # Appium related errors
25
21
  class NotSupportedAppiumServer < CoreError; end
26
22
  class NoSuchElementError < CoreError; end
27
23
 
28
24
  class UnsupportedOperationError < CoreError; end
29
25
 
30
- # Server side error
26
+ # Server side errors
31
27
  class ServerError < CoreError; end
28
+
29
+ # ruby_lib_core library specific errors
30
+ class SessionNotCreatedError < CoreError; end
31
+ class ArgumentError < CoreError; end
32
32
  end
33
33
  end
34
34
  end
@@ -44,8 +44,7 @@ module Appium
44
44
 
45
45
  # @since Appium 1.16.0
46
46
  #
47
- # Logs a custom event. The event is available via {::Appium::Core::Events#get} or
48
- # <code>@driver.session_capabilities['events']</code> with <code>eventTimings</code> capabilities.
47
+ # Logs a custom event. The event is available via {::Appium::Core::Events#get}.
49
48
  #
50
49
  # @param [String] vendor The vendor prefix for the event
51
50
  # @param [String] event The name of event
@@ -54,7 +53,6 @@ module Appium
54
53
  # @example
55
54
  #
56
55
  # @driver.logs.event vendor: 'appium', event: 'funEvent'
57
- # @driver.session_capabilities['events'] #=> {...., 'appium:funEvent' => 1572957315}
58
56
  #
59
57
  # @driver.logs.event = { vendor: 'appium', event: 'anotherEvent' }
60
58
  # @driver.logs.events #=> {...., 'appium:funEvent' => [1572957315, 1572960305],
@@ -65,7 +63,10 @@ module Appium
65
63
  end
66
64
 
67
65
  def event=(log_event)
68
- raise ArgumentError('log_event should be Hash like { vendor: "appium", event: "funEvent"}') unless log_event.is_a?(Hash)
66
+ unless log_event.is_a?(Hash)
67
+ raise ::Appium::Core::Error::ArgumentError,
68
+ 'log_event should be Hash like { vendor: "appium", event: "funEvent"}'
69
+ end
69
70
 
70
71
  event vendor: log_event[:vendor], event: log_event[:event]
71
72
  end
@@ -38,6 +38,8 @@ module Appium
38
38
  #
39
39
  # result = Appium::Core::Wait.until { @driver.find_element(:id, 'something') }
40
40
  #
41
+ # result = Appium::Core::Wait.until(timeout: 30, message: 'timeout') { @driver.find_element(:id, 'something') }
42
+ #
41
43
  # result = Appium::Core::Wait.until(object: 'some object') { |object|
42
44
  # @driver.find_element(:id, object)
43
45
  # }
@@ -82,6 +84,8 @@ module Appium
82
84
  #
83
85
  # Appium::Core::Wait.until_true { @driver.find_element(:id, 'something') }
84
86
  #
87
+ # Appium::Core::Wait.until_true(timeout: 30) { @driver.find_element(:id, 'something') }
88
+ #
85
89
  # Appium::Core::Wait.until_true(object: 'some object') { |object|
86
90
  # @driver.find_element(:id, object)
87
91
  # }
@@ -133,17 +137,31 @@ module Appium
133
137
  # @param [String] message Exception message if timed out.
134
138
  # @param [Array, Exception] ignored Exceptions to ignore while polling (default: Exception)
135
139
  #
136
- # @example
140
+ # @example With core instance
137
141
  #
138
142
  # @core.wait_true { @driver.find_element :accessibility_id, 'something' }
143
+ # @core.wait_true(timeout: 30, interval: 2) { @driver.find_element :accessibility_id, 'something' }
144
+ #
145
+ # @core.wait_until_true { @driver.find_element :accessibility_id, 'something' }
146
+ # @core.wait_until_true(timeout: 30, interval: 2) { @driver.find_element :accessibility_id, 'something' }
147
+ #
148
+ # @example With driver instance
149
+ #
150
+ # @driver.wait_true { |d| d.find_element :accessibility_id, 'something' }
151
+ # @driver.wait_true(timeout: 30, interval: 2) { |d| driver.find_element :accessibility_id, 'something' }
139
152
  #
140
- def wait_true(timeout: nil, interval: nil, message: nil, ignored: nil)
153
+ # @driver.wait_until_true { |d| d.find_element :accessibility_id, 'something' }
154
+ # @driver.wait_until_true(timeout: 30, interval: 2) { |d| driver.find_element :accessibility_id, 'something' }
155
+ #
156
+ def wait_until_true(timeout: nil, interval: nil, message: nil, ignored: nil, &block)
141
157
  Wait.until_true(timeout: timeout || @wait_timeout,
142
158
  interval: interval || @wait_interval,
143
159
  message: message,
144
160
  ignored: ignored,
145
- object: self) { yield }
161
+ object: self,
162
+ &block)
146
163
  end
164
+ alias wait_true wait_until_true
147
165
 
148
166
  # Check every interval seconds to see if yield doesn't raise an exception.
149
167
  # Give up after timeout seconds.
@@ -155,17 +173,31 @@ module Appium
155
173
  # @param [String] message Exception message if timed out.
156
174
  # @param [Array, Exception] ignored Exceptions to ignore while polling (default: Exception)
157
175
  #
158
- # @example
176
+ # @example With core instance
159
177
  #
160
178
  # @core.wait { @driver.find_element :accessibility_id, 'something' }
179
+ # @core.wait(timeout: 30, interval: 2) { @driver.find_element :accessibility_id, 'something' }
180
+ #
181
+ # @core.wait_until { @driver.find_element :accessibility_id, 'something' }
182
+ # @core.wait_until(timeout: 30, interval: 2) { @driver.find_element :accessibility_id, 'something' }
183
+ #
184
+ # @example With driver instance
185
+ #
186
+ # @driver.wait { @driver.find_element :accessibility_id, 'something' }
187
+ # @driver.wait(timeout: 30, interval: 2) { @driver.find_element :accessibility_id, 'something' }
188
+ #
189
+ # @driver.wait_until { |d| d.find_element :accessibility_id, 'something' }
190
+ # @driver.wait_until(timeout: 30, interval: 2) { |d| d.find_element :accessibility_id, 'something' }
161
191
  #
162
- def wait(timeout: nil, interval: nil, message: nil, ignored: nil)
192
+ def wait_until(timeout: nil, interval: nil, message: nil, ignored: nil, &block)
163
193
  Wait.until(timeout: timeout || @wait_timeout,
164
194
  interval: interval || @wait_interval,
165
195
  message: message,
166
196
  ignored: ignored,
167
- object: self) { yield }
197
+ object: self,
198
+ &block)
168
199
  end
200
+ alias wait wait_until
169
201
  end
170
202
  end # module Core
171
203
  end # module Appium
@@ -29,17 +29,15 @@ module Appium
29
29
  :hide_keyboard, :is_keyboard_shown,
30
30
  :ime_activate, :ime_available_engines, :ime_active_engine, :ime_activated, :ime_deactivate,
31
31
  :get_settings, :update_settings,
32
- :within_context, :switch_to_default_context, :current_context, :available_contexts, :set_context,
33
- :set_immediate_value, :replace_value,
32
+ :within_context, :current_context, :available_contexts, :set_context,
34
33
  :push_file, :pull_file, :pull_folder,
35
34
  :keyevent, :press_keycode, :long_press_keycode,
36
35
  :match_images_features, :find_image_occurrence, :get_images_similarity, :compare_images,
37
- :launch_app, :close_app, :reset, :app_strings, :background_app,
36
+ :app_strings, :background_app,
38
37
  :install_app, :remove_app, :app_installed?, :activate_app, :terminate_app,
39
38
  :app_state,
40
39
  :stop_recording_screen, :stop_and_save_recording_screen,
41
40
  :shake, :device_time,
42
- :touch_actions, :multi_touch,
43
41
  :execute_driver, :execute_cdp
44
42
  ].each(&method(:delegate_from_appium_driver))
45
43
  end
@@ -79,11 +77,7 @@ module Appium
79
77
  end
80
78
 
81
79
  def create_bridge_command(method, &block)
82
- ::Appium::Core::Base::Bridge::MJSONWP.class_eval do
83
- undef_method method if method_defined? method
84
- block_given? ? class_eval(&block) : define_method(method) { execute method }
85
- end
86
- ::Appium::Core::Base::Bridge::W3C.class_eval do
80
+ ::Appium::Core::Base::Bridge.class_eval do
87
81
  undef_method method if method_defined? method
88
82
  block_given? ? class_eval(&block) : define_method(method) { execute method }
89
83
  end