appium_lib_core 10.0.0 → 11.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/Gemfile +1 -1
  4. data/lib/appium_lib_core/android/device/auth_finger_print.rb +1 -4
  5. data/lib/appium_lib_core/android/device/clipboard.rb +2 -2
  6. data/lib/appium_lib_core/android/device/emulator.rb +7 -8
  7. data/lib/appium_lib_core/android/device/performance.rb +3 -7
  8. data/lib/appium_lib_core/android/device/screen.rb +1 -3
  9. data/lib/appium_lib_core/android/device.rb +12 -184
  10. data/lib/appium_lib_core/common/base/bridge.rb +0 -14
  11. data/lib/appium_lib_core/common/base/driver.rb +6 -35
  12. data/lib/appium_lib_core/common/command.rb +1 -45
  13. data/lib/appium_lib_core/common/device/app_management.rb +1 -1
  14. data/lib/appium_lib_core/common/device/app_state.rb +2 -2
  15. data/lib/appium_lib_core/common/device/device.rb +3 -2
  16. data/lib/appium_lib_core/common/device/device_lock.rb +3 -3
  17. data/lib/appium_lib_core/common/device/keyboard.rb +4 -5
  18. data/lib/appium_lib_core/common/device/keyevent.rb +3 -3
  19. data/lib/appium_lib_core/common/log.rb +4 -4
  20. data/lib/appium_lib_core/common/ws/websocket.rb +1 -1
  21. data/lib/appium_lib_core/ios/device/clipboard.rb +2 -2
  22. data/lib/appium_lib_core/ios/device.rb +2 -2
  23. data/lib/appium_lib_core/ios/xcuitest/device.rb +4 -13
  24. data/lib/appium_lib_core/version.rb +2 -2
  25. data/sig/lib/appium_lib_core/common/base/driver.rbs +1 -5
  26. metadata +3 -7
  27. data/lib/appium_lib_core/android/device/network.rb +0 -71
  28. data/lib/appium_lib_core/common/base/has_network_connection.rb +0 -56
  29. data/sig/gems/selenium/has_web_storage.rbs +0 -8
  30. data/sig/lib/appium_lib_core/common/base/has_network_connection.rbs +0 -19
@@ -20,7 +20,6 @@ require_relative 'screenshot'
20
20
  require_relative 'rotable'
21
21
  require_relative 'remote_status'
22
22
  require_relative 'has_location'
23
- require_relative 'has_network_connection'
24
23
  require_relative '../wait'
25
24
 
26
25
  module Appium
@@ -29,13 +28,11 @@ module Appium
29
28
  class Driver < ::Selenium::WebDriver::Driver
30
29
  include ::Selenium::WebDriver::DriverExtensions::UploadsFiles
31
30
  include ::Selenium::WebDriver::DriverExtensions::HasSessionId
32
- include ::Selenium::WebDriver::DriverExtensions::HasWebStorage
33
31
 
34
32
  include ::Appium::Core::Base::Rotatable
35
33
  include ::Appium::Core::Base::TakesScreenshot
36
34
  include ::Appium::Core::Base::HasRemoteStatus
37
35
  include ::Appium::Core::Base::HasLocation
38
- include ::Appium::Core::Base::HasNetworkConnection
39
36
 
40
37
  include ::Appium::Core::Waitable
41
38
 
@@ -223,7 +220,6 @@ module Appium
223
220
  )
224
221
  end
225
222
 
226
- # @deprecated Use 'mobile: lock' extension instead.
227
223
  # Lock the device
228
224
  # @return [String]
229
225
  #
@@ -234,11 +230,9 @@ module Appium
234
230
  # # Block other commands during locking the device.
235
231
  #
236
232
  def lock(duration = nil)
237
- ::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: lock' extension instead"
238
233
  @bridge.lock(duration)
239
234
  end
240
235
 
241
- # @deprecated Use 'mobile: isLocked' extension instead.
242
236
  # Check current device status is weather locked or not
243
237
  #
244
238
  # @example
@@ -247,12 +241,10 @@ module Appium
247
241
  # @driver.locked?
248
242
  #
249
243
  def locked?
250
- ::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: isLocked' extension instead"
251
244
  @bridge.device_locked?
252
245
  end
253
246
  alias device_locked? locked?
254
247
 
255
- # @deprecated Use 'mobile: unlock' extension instead.
256
248
  # Unlock the device
257
249
  #
258
250
  # @example
@@ -260,30 +252,22 @@ module Appium
260
252
  # @driver.unlock
261
253
  #
262
254
  def unlock
263
- ::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: unlock' extension instead"
264
255
  @bridge.unlock
265
256
  end
266
257
 
267
- # @deprecated Use 'mobile: hideKeyboard' extension instead.
268
258
  # Hide the onscreen keyboard
269
259
  # @param [String] close_key The name of the key which closes the keyboard.
270
260
  # Defaults to 'Done' for iOS(except for XCUITest).
271
- # @param [Symbol] strategy The symbol of the strategy which closes the keyboard.
272
- # XCUITest ignore this argument.
273
- # Default for iOS is +:pressKey+. Default for Android is +:tapOutside+.
274
261
  #
275
262
  # @example
276
263
  #
277
264
  # @driver.hide_keyboard # Close a keyboard with the 'Done' button
278
265
  # @driver.hide_keyboard('Finished') # Close a keyboard with the 'Finished' button
279
- # @driver.hide_keyboard(nil, :tapOutside) # Close a keyboard with tapping out side of keyboard
280
266
  #
281
- def hide_keyboard(close_key = nil, strategy = nil)
282
- ::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: hideKeyboard' extension instead"
283
- @bridge.hide_keyboard close_key, strategy
267
+ def hide_keyboard(close_key = nil)
268
+ @bridge.hide_keyboard close_key
284
269
  end
285
270
 
286
- # @deprecated Use 'mobile: isKeyboardShown' extension instead.
287
271
  # Get whether keyboard is displayed or not.
288
272
  # @return [Boolean] Return true if keyboard is shown. Return false if keyboard is hidden.
289
273
  #
@@ -292,7 +276,6 @@ module Appium
292
276
  # @driver.keyboard_shown? # true
293
277
  #
294
278
  def keyboard_shown?
295
- ::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: isKeyboardShown' extension instead"
296
279
  @bridge.is_keyboard_shown
297
280
  end
298
281
  alias is_keyboard_shown keyboard_shown?
@@ -542,15 +525,14 @@ module Appium
542
525
  @bridge.pull_folder(path)
543
526
  end
544
527
 
545
- # @deprecated Use 'mobile: pressKey' extension instead.
546
528
  # Press keycode on the device.
547
529
  # http://developer.android.com/reference/android/view/KeyEvent.html
548
530
  # @param [Integer] key The key to press. The values which have +KEYCODE_+ prefix in http://developer.android.com/reference/android/view/KeyEvent.html
549
531
  # e.g.: KEYCODE_HOME is +3+ or +0x00000003+
550
- # @param [[Integer]] metastate The state the metakeys should be in when pressing the key. Default is empty Array.
532
+ # @param [Array<Integer>] metastate The state the metakeys should be in when pressing the key. Default is empty Array.
551
533
  # Metastate have +META_+ prefix in https://developer.android.com/reference/android/view/KeyEvent.html
552
534
  # e.g.: META_SHIFT_ON is +1+ or +0x00000001+
553
- # @param [[Integer]] flags Native Android flag value. Several flags can be combined into a single key event.
535
+ # @param [Array<Integer>] flags Native Android flag value. Several flags can be combined into a single key event.
554
536
  # Default is empty Array. Can set multiple flags as Array.
555
537
  # Flags have +FLAG_+ prefix in http://developer.android.com/reference/android/view/KeyEvent.html
556
538
  # e.g.: FLAG_CANCELED is +32+ or +0x00000020+
@@ -562,19 +544,17 @@ module Appium
562
544
  # @driver.press_keycode 66, metastate: [1], flags: [32]
563
545
  #
564
546
  def press_keycode(key, metastate: [], flags: [])
565
- ::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: pressKey' extension instead"
566
547
  @bridge.press_keycode(key, metastate: metastate, flags: flags)
567
548
  end
568
549
 
569
- # @deprecated Use 'mobile: pressKey' extension instead.
570
550
  # Long press keycode on the device.
571
551
  # http://developer.android.com/reference/android/view/KeyEvent.html
572
552
  # @param [Integer] key The key to long press. The values which have +KEYCODE_+ prefix in http://developer.android.com/reference/android/view/KeyEvent.html
573
553
  # e.g.: KEYCODE_HOME is +3+ or +0x00000003+
574
- # @param [[Integer]] metastate The state the metakeys should be in when pressing the key. Default is empty Array.
554
+ # @param [Array<Integer>] metastate The state the metakeys should be in when pressing the key. Default is empty Array.
575
555
  # Metastate have +META_+ prefix in https://developer.android.com/reference/android/view/KeyEvent.html
576
556
  # e.g.: META_SHIFT_ON is +1+ or +0x00000001+
577
- # @param [[Integer]] flags Native Android flag value. Several flags can be combined into a single key event.
557
+ # @param [Array<Integer>] flags Native Android flag value. Several flags can be combined into a single key event.
578
558
  # Default is empty Array. Can set multiple flags as Array.
579
559
  # Flags have +FLAG_+ prefix in http://developer.android.com/reference/android/view/KeyEvent.html
580
560
  # e.g.: FLAG_CANCELED is +32+ or +0x00000020+
@@ -586,11 +566,9 @@ module Appium
586
566
  # @driver.long_press_keycode 66, metastate: [1], flags: [32, 8192]
587
567
  #
588
568
  def long_press_keycode(key, metastate: [], flags: [])
589
- ::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: pressKey' extension instead"
590
569
  @bridge.long_press_keycode(key, metastate: metastate, flags: flags)
591
570
  end
592
571
 
593
- # @deprecated Use 'mobile: getAppStrings' extension instead.
594
572
  # Return the hash of all localization strings.
595
573
  # @return [Hash]
596
574
  #
@@ -599,11 +577,9 @@ module Appium
599
577
  # @driver.app_strings #=> "TransitionsTitle"=>"Transitions", "WebTitle"=>"Web"
600
578
  #
601
579
  def app_strings(language = nil)
602
- ::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: getAppStrings' extension instead"
603
580
  @bridge.app_strings(language)
604
581
  end
605
582
 
606
- # @deprecated Use 'mobile: backgroundApp' extension instead.
607
583
  # Backgrounds the app for a set number of seconds.
608
584
  # This is a blocking application
609
585
  # @param [Integer] duration How many seconds to background the app for.
@@ -732,7 +708,6 @@ module Appium
732
708
  # @driver.query_app_state("io.appium.bundle") #=> :not_running
733
709
  #
734
710
  def app_state(app_id)
735
- # TODO: use mobile command in the background?
736
711
  @bridge.app_state(app_id)
737
712
  end
738
713
  alias query_app_state app_state
@@ -772,7 +747,6 @@ module Appium
772
747
  @bridge.stop_and_save_recording_screen(file_path)
773
748
  end
774
749
 
775
- # @deprecated Use 'mobile: shake' extension instead.
776
750
  # Cause the device to shake
777
751
  #
778
752
  # @example
@@ -780,11 +754,9 @@ module Appium
780
754
  # @driver.shake
781
755
  #
782
756
  def shake
783
- ::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: shake' extension instead"
784
757
  @bridge.shake
785
758
  end
786
759
 
787
- # @deprecated Use 'mobile: getDeviceTime' extension instead.
788
760
  # Get the time on the device
789
761
  #
790
762
  # @param [String] format The set of format specifiers. Read https://momentjs.com/docs/ to get
@@ -798,7 +770,6 @@ module Appium
798
770
  # @driver.device_time "YYYY-MM-DD" #=> "2018-06-12"
799
771
  #
800
772
  def device_time(format = nil)
801
- ::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: getDeviceTime' extension instead"
802
773
  @bridge.device_time(format)
803
774
  end
804
775
 
@@ -184,75 +184,31 @@ module Appium
184
184
  set_context: [:post, 'session/:session_id/context'],
185
185
  current_context: [:get, 'session/:session_id/context'],
186
186
 
187
- background_app: [:post, 'session/:session_id/appium/app/background'],
188
- app_strings: [:post, 'session/:session_id/appium/app/strings'],
189
-
190
- device_locked?: [:post, 'session/:session_id/appium/device/is_locked'],
191
- unlock: [:post, 'session/:session_id/appium/device/unlock'],
192
- lock: [:post, 'session/:session_id/appium/device/lock'],
193
187
  device_time: [:get, 'session/:session_id/appium/device/system_time'],
194
188
  install_app: [:post, 'session/:session_id/appium/device/install_app'],
195
189
  remove_app: [:post, 'session/:session_id/appium/device/remove_app'],
196
190
  app_installed?: [:post, 'session/:session_id/appium/device/app_installed'],
197
191
  activate_app: [:post, 'session/:session_id/appium/device/activate_app'],
198
192
  terminate_app: [:post, 'session/:session_id/appium/device/terminate_app'],
199
- app_state: [:post, 'session/:session_id/appium/device/app_state'],
200
- shake: [:post, 'session/:session_id/appium/device/shake'],
201
- hide_keyboard: [:post, 'session/:session_id/appium/device/hide_keyboard'],
202
- press_keycode: [:post, 'session/:session_id/appium/device/press_keycode'],
203
- long_press_keycode: [:post, 'session/:session_id/appium/device/long_press_keycode'],
204
193
  push_file: [:post, 'session/:session_id/appium/device/push_file'],
205
194
  pull_file: [:post, 'session/:session_id/appium/device/pull_file'],
206
195
  pull_folder: [:post, 'session/:session_id/appium/device/pull_folder'],
207
- get_clipboard: [:post, 'session/:session_id/appium/device/get_clipboard'],
208
- set_clipboard: [:post, 'session/:session_id/appium/device/set_clipboard'],
209
- finger_print: [:post, 'session/:session_id/appium/device/finger_print'],
210
196
  get_settings: [:get, 'session/:session_id/appium/settings'],
211
197
  update_settings: [:post, 'session/:session_id/appium/settings'],
212
198
  stop_recording_screen: [:post, 'session/:session_id/appium/stop_recording_screen'],
213
199
  start_recording_screen: [:post, 'session/:session_id/appium/start_recording_screen'],
214
200
  compare_images: [:post, 'session/:session_id/appium/compare_images'],
215
- is_keyboard_shown: [:get, 'session/:session_id/appium/device/is_keyboard_shown'],
216
201
  execute_driver: [:post, 'session/:session_id/appium/execute_driver'],
217
202
  post_log_event: [:post, 'session/:session_id/appium/log_event'],
218
203
  get_log_events: [:post, 'session/:session_id/appium/events']
219
204
  }.freeze
220
205
 
221
206
  COMMAND_ANDROID = {
222
- open_notifications: [:post, 'session/:session_id/appium/device/open_notifications'],
223
- toggle_airplane_mode: [:post, 'session/:session_id/appium/device/toggle_airplane_mode'],
224
- start_activity: [:post, 'session/:session_id/appium/device/start_activity'],
225
- current_activity: [:get, 'session/:session_id/appium/device/current_activity'],
226
- current_package: [:get, 'session/:session_id/appium/device/current_package'],
227
- get_system_bars: [:get, 'session/:session_id/appium/device/system_bars'],
228
- get_display_density: [:get, 'session/:session_id/appium/device/display_density'],
229
- toggle_wifi: [:post, 'session/:session_id/appium/device/toggle_wifi'],
230
- toggle_data: [:post, 'session/:session_id/appium/device/toggle_data'],
231
- toggle_location_services: [:post, 'session/:session_id/appium/device/toggle_location_services'],
232
- get_performance_data_types: [:post, 'session/:session_id/appium/performanceData/types'],
233
- get_performance_data: [:post, 'session/:session_id/appium/getPerformanceData'],
234
- get_network_connection: [:get, 'session/:session_id/network_connection'], # defined also in OSS
235
- set_network_connection: [:post, 'session/:session_id/network_connection'], # defined also in OSS
236
-
237
- # only emulator
238
- send_sms: [:post, 'session/:session_id/appium/device/send_sms'],
239
- gsm_call: [:post, 'session/:session_id/appium/device/gsm_call'],
240
- gsm_signal: [:post, 'session/:session_id/appium/device/gsm_signal'],
241
- gsm_voice: [:post, 'session/:session_id/appium/device/gsm_voice'],
242
- set_network_speed: [:post, 'session/:session_id/appium/device/network_speed'],
243
- set_power_capacity: [:post, 'session/:session_id/appium/device/power_capacity'],
244
- set_power_ac: [:post, 'session/:session_id/appium/device/power_ac'],
245
-
246
207
  # For chromium: https://chromium.googlesource.com/chromium/src/+/master/chrome/test/chromedriver/server/http_handler.cc
247
208
  chrome_send_command: [:post, 'session/:session_id/goog/cdp/execute']
248
209
  }.freeze
249
210
 
250
- COMMAND_IOS = {
251
- touch_id: [:post, 'session/:session_id/appium/simulator/touch_id'],
252
- toggle_touch_id_enrollment: [:post, 'session/:session_id/appium/simulator/toggle_touch_id_enrollment']
253
- }.freeze
254
-
255
- COMMANDS = {}.merge(COMMAND).merge(COMMAND_ANDROID).merge(COMMAND_IOS).freeze
211
+ COMMANDS = {}.merge(COMMAND).merge(COMMAND_ANDROID).freeze
256
212
  end # module Commands
257
213
  end # module Core
258
214
  end # module Appium
@@ -19,7 +19,7 @@ module Appium
19
19
  module AppManagement
20
20
  def app_strings(language = nil)
21
21
  opts = language ? { language: language } : {}
22
- execute :app_strings, {}, opts
22
+ execute_script 'mobile:getAppStrings', opts
23
23
  end
24
24
 
25
25
  def background_app(duration = 0)
@@ -26,8 +26,8 @@ module Appium
26
26
  ].freeze
27
27
 
28
28
  def app_state(app_id)
29
- # required: [['appId'], ['bundleId']]
30
- response = execute :app_state, {}, appId: app_id
29
+ # appId is for android, bundleId is for ios.
30
+ response = execute_script 'mobile:queryAppState', { 'appId': app_id, 'bundleId': app_id }
31
31
 
32
32
  case response
33
33
  when 0, 1, 2, 3, 4
@@ -18,13 +18,14 @@ module Appium
18
18
  module Device
19
19
  module Device
20
20
  def shake
21
- execute :shake
21
+ execute_script 'mobile:shake', {}
22
22
  end
23
23
 
24
24
  def device_time(format = nil)
25
25
  arg = {}
26
26
  arg[:format] = format unless format.nil?
27
- execute :device_time, {}, arg
27
+
28
+ execute_script 'mobile:getDeviceTime', arg
28
29
  end
29
30
  end # module Device
30
31
  end # module Device
@@ -19,15 +19,15 @@ module Appium
19
19
  module DeviceLock
20
20
  def lock(duration = nil)
21
21
  opts = duration ? { seconds: duration } : {}
22
- execute :lock, {}, opts
22
+ execute_script 'mobile:lock', opts
23
23
  end
24
24
 
25
25
  def device_locked?
26
- execute :device_locked?
26
+ execute_script 'mobile:isLocked', {}
27
27
  end
28
28
 
29
29
  def unlock
30
- execute :unlock
30
+ execute_script 'mobile:unlock', {}
31
31
  end
32
32
  end # module DeviceLock
33
33
  end # module Device
@@ -17,17 +17,16 @@ module Appium
17
17
  class Base
18
18
  module Device
19
19
  module Keyboard
20
- def hide_keyboard(close_key = nil, strategy = nil)
20
+ def hide_keyboard(close_key = nil)
21
21
  option = {}
22
22
 
23
- option[:key] = close_key || 'Done' # default to Done key.
24
- option[:strategy] = strategy || :pressKey # default to pressKey
23
+ option[:key] = close_key || 'Done' # default to Done key.
25
24
 
26
- execute :hide_keyboard, {}, option
25
+ execute_script 'mobile:hideKeyboard', option
27
26
  end
28
27
 
29
28
  def is_keyboard_shown # rubocop:disable Naming/PredicateName
30
- execute :is_keyboard_shown
29
+ execute_script 'mobile:isKeyboardShown', {}
31
30
  end
32
31
  end # module Keyboard
33
32
  end # module Device
@@ -32,18 +32,18 @@ module Appium
32
32
  args[:metastate] = metastate.reduce(0) { |acc, meta| acc | meta } unless metastate.empty?
33
33
  args[:flags] = flags.reduce(0) { |acc, flag| acc | flag } unless flags.empty?
34
34
 
35
- execute :press_keycode, {}, args
35
+ execute_script 'mobile:pressKey', args
36
36
  end
37
37
 
38
38
  def long_press_keycode(key, metastate: [], flags: [])
39
39
  raise ::Appium::Core::Error::ArgumentError, 'flags should be Array' unless flags.is_a? Array
40
40
  raise ::Appium::Core::Error::ArgumentError, 'metastates should be Array' unless metastate.is_a? Array
41
41
 
42
- args = { keycode: key }
42
+ args = { keycode: key, isLongPress: true }
43
43
  args[:metastate] = metastate.reduce(0) { |acc, meta| acc | meta } unless metastate.empty?
44
44
  args[:flags] = flags.reduce(0) { |acc, flag| acc | flag } unless flags.empty?
45
45
 
46
- execute :long_press_keycode, {}, args
46
+ execute_script 'mobile:pressKey', args
47
47
  end
48
48
  end # module KeyEvent
49
49
  end # module Device
@@ -19,8 +19,8 @@ module Appium
19
19
  @bridge = bridge
20
20
  end
21
21
 
22
- # @param [String|Hash] type You can get particular type's logs.
23
- # @return [[Selenium::WebDriver::LogEntry]] A list of logs data.
22
+ # @param [String, Hash] type You can get particular type's logs.
23
+ # @return [Array<Selenium::WebDriver::LogEntry>] A list of logs data.
24
24
  #
25
25
  # @example
26
26
  #
@@ -33,7 +33,7 @@ module Appium
33
33
 
34
34
  # Get a list of available log types
35
35
  #
36
- # @return [[Hash]] A list of available log types.
36
+ # @return [Array<Hash>] A list of available log types.
37
37
  # @example
38
38
  #
39
39
  # @driver.logs.available_types # [:syslog, :crashlog, :performance]
@@ -74,7 +74,7 @@ module Appium
74
74
  # @since Appium 1.16.0
75
75
  # Returns events with filtering with 'type'. Defaults to all available events.
76
76
  #
77
- # @param [String] type The type of events to get
77
+ # @param [String, Array<String>] type The type of events to get
78
78
  # @return [Hash]
79
79
  #
80
80
  # @example
@@ -84,7 +84,7 @@ module Appium
84
84
  # Accepts either a String or an Array of byte-sized integers and sends a text or binary message over the connection
85
85
  # to the other peer; binary data must be encoded as an Array.
86
86
  #
87
- # @param [String|Array] message A message to send a text or binary message over the connection
87
+ # @param [String, Array] message A message to send a text or binary message over the connection
88
88
  #
89
89
  # @example
90
90
  # ws = WebSocket.new(url: "ws://#{host}:#{port}/ws/session/#{@session_id}/appium/device/logcat")
@@ -29,7 +29,7 @@ module Appium
29
29
 
30
30
  params = { contentType: content_type }
31
31
 
32
- data = execute(:get_clipboard, {}, params)
32
+ data = execute_script 'mobile:getClipboard', params
33
33
  Base64.decode64 data
34
34
  end
35
35
  end
@@ -46,7 +46,7 @@ module Appium
46
46
  content: Base64.strict_encode64(content)
47
47
  }
48
48
 
49
- execute(:set_clipboard, {}, params)
49
+ execute_script 'mobile:setClipboard', params
50
50
  end
51
51
  end
52
52
  end
@@ -75,13 +75,13 @@ module Appium
75
75
 
76
76
  ::Appium::Core::Device.add_endpoint_method(:touch_id) do
77
77
  def touch_id(match = true)
78
- execute :touch_id, {}, match: match
78
+ execute_script 'mobile:sendBiometricMatch', { 'type': 'touch_id', match: match }
79
79
  end
80
80
  end
81
81
 
82
82
  ::Appium::Core::Device.add_endpoint_method(:toggle_touch_id_enrollment) do
83
83
  def toggle_touch_id_enrollment(enabled = true)
84
- execute :toggle_touch_id_enrollment, {}, enabled: enabled
84
+ execute_script 'mobile:enrollBiometric', { 'isEnabled': enabled }
85
85
  end
86
86
  end
87
87
 
@@ -25,13 +25,9 @@ module Appium
25
25
 
26
26
  # rubocop:disable Layout/LineLength
27
27
 
28
- # @deprecated Use 'mobile: hideKeyboard' extension instead.
29
- # @!method hide_keyboard(close_key = nil, strategy = nil)
28
+ # @!method hide_keyboard(close_key = nil)
30
29
  # Hide the onscreen keyboard
31
30
  # @param [String] close_key The name of the key which closes the keyboard.
32
- # @param [Symbol] strategy The symbol of the strategy which closes the keyboard.
33
- # XCUITest ignore this argument.
34
- # Default for iOS is +:pressKey+. Default for Android is +:tapOutside+.
35
31
  #
36
32
  # @example
37
33
  #
@@ -39,7 +35,6 @@ module Appium
39
35
  # @driver.hide_keyboard('Finished') # Close a keyboard with the 'Finished' button
40
36
  #
41
37
 
42
- # @deprecated Use 'mobile: backgroundApp' extension instead.
43
38
  # @!method background_app(duration = 0)
44
39
  # Backgrounds the app for a set number of seconds.
45
40
  # This is a blocking application.
@@ -183,23 +178,19 @@ module Appium
183
178
  def extended(_mod)
184
179
  # Xcuitest, Override included method in bridge
185
180
  ::Appium::Core::Device.add_endpoint_method(:hide_keyboard) do
186
- def hide_keyboard(close_key = nil, strategy = nil)
181
+ def hide_keyboard(close_key = nil)
187
182
  option = {}
188
183
 
189
184
  option[:key] = close_key if close_key
190
- option[:strategy] = strategy if strategy
191
185
 
192
- execute :hide_keyboard, {}, option
186
+ execute_script 'mobile:hideKeyboard', option
193
187
  end
194
188
  end
195
189
 
196
190
  # Xcuitest, Override included method in bridge
197
191
  ::Appium::Core::Device.add_endpoint_method(:background_app) do
198
192
  def background_app(duration = 0)
199
- # https://github.com/appium/ruby_lib/issues/500, https://github.com/appium/appium/issues/7741
200
- # 'execute :background_app, {}, seconds: { timeout: duration_milli_sec }' works over Appium 1.6.4
201
- duration_milli_sec = duration.nil? ? nil : duration * 1000
202
- execute :background_app, {}, seconds: { timeout: duration_milli_sec }
193
+ execute_script 'mobile:backgroundApp', { seconds: duration }
203
194
  end
204
195
  end
205
196
 
@@ -14,7 +14,7 @@
14
14
 
15
15
  module Appium
16
16
  module Core
17
- VERSION = '10.0.0' unless defined? ::Appium::Core::VERSION
18
- DATE = '2025-02-16' unless defined? ::Appium::Core::DATE
17
+ VERSION = '11.0.1' unless defined? ::Appium::Core::VERSION
18
+ DATE = '2025-03-27' unless defined? ::Appium::Core::DATE
19
19
  end
20
20
  end
@@ -22,8 +22,6 @@ module Appium
22
22
 
23
23
  include Selenium::WebDriver::DriverExtensions::HasSessionId
24
24
 
25
- include Selenium::WebDriver::DriverExtensions::HasWebStorage
26
-
27
25
  include Base::Rotatable
28
26
 
29
27
  include Base::TakesScreenshot
@@ -32,8 +30,6 @@ module Appium
32
30
 
33
31
  include Base::HasLocation
34
32
 
35
- include Base::HasNetworkConnection
36
-
37
33
  include Core::Waitable
38
34
 
39
35
  attr_reader bridge: untyped
@@ -62,7 +58,7 @@ module Appium
62
58
 
63
59
  def unlock: () -> untyped
64
60
 
65
- def hide_keyboard: (?untyped? close_key, ?untyped? strategy) -> untyped
61
+ def hide_keyboard: (?untyped? close_key) -> untyped
66
62
 
67
63
  def keyboard_shown?: () -> untyped
68
64
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_lib_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.0
4
+ version: 11.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki MATSUO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-02-17 00:00:00.000000000 Z
11
+ date: 2025-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faye-websocket
@@ -61,7 +61,6 @@ files:
61
61
  - lib/appium_lib_core/android/device/auth_finger_print.rb
62
62
  - lib/appium_lib_core/android/device/clipboard.rb
63
63
  - lib/appium_lib_core/android/device/emulator.rb
64
- - lib/appium_lib_core/android/device/network.rb
65
64
  - lib/appium_lib_core/android/device/performance.rb
66
65
  - lib/appium_lib_core/android/device/screen.rb
67
66
  - lib/appium_lib_core/android/espresso/bridge.rb
@@ -79,7 +78,6 @@ files:
79
78
  - lib/appium_lib_core/common/base/driver.rb
80
79
  - lib/appium_lib_core/common/base/driver_settings.rb
81
80
  - lib/appium_lib_core/common/base/has_location.rb
82
- - lib/appium_lib_core/common/base/has_network_connection.rb
83
81
  - lib/appium_lib_core/common/base/http_default.rb
84
82
  - lib/appium_lib_core/common/base/platform.rb
85
83
  - lib/appium_lib_core/common/base/remote_status.rb
@@ -138,14 +136,12 @@ files:
138
136
  - sig/gems/selenium/default.rbs
139
137
  - sig/gems/selenium/driver.rbs
140
138
  - sig/gems/selenium/has_session_id.rbs
141
- - sig/gems/selenium/has_web_storage.rbs
142
139
  - sig/gems/selenium/uploads_files.rbs
143
140
  - sig/lib/appium_lib_core.rbs
144
141
  - sig/lib/appium_lib_core/common/base/capabilities.rbs
145
142
  - sig/lib/appium_lib_core/common/base/driver.rbs
146
143
  - sig/lib/appium_lib_core/common/base/driver_settings.rbs
147
144
  - sig/lib/appium_lib_core/common/base/has_location.rbs
148
- - sig/lib/appium_lib_core/common/base/has_network_connection.rbs
149
145
  - sig/lib/appium_lib_core/common/base/http_default.rbs
150
146
  - sig/lib/appium_lib_core/common/base/platform.rbs
151
147
  - sig/lib/appium_lib_core/common/base/remote_status.rbs
@@ -177,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
173
  - !ruby/object:Gem::Version
178
174
  version: '0'
179
175
  requirements: []
180
- rubygems_version: 3.5.9
176
+ rubygems_version: 3.4.10
181
177
  signing_key:
182
178
  specification_version: 4
183
179
  summary: Minimal Ruby library for Appium.