appium_lib_core 7.2.0 → 7.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/appium_lib_core.gemspec +1 -1
- data/lib/appium_lib_core/android/device/auth_finger_print.rb +2 -0
- data/lib/appium_lib_core/android/device/network.rb +10 -0
- data/lib/appium_lib_core/android/device/performance.rb +3 -0
- data/lib/appium_lib_core/android/device/screen.rb +2 -0
- data/lib/appium_lib_core/android/device.rb +37 -0
- data/lib/appium_lib_core/common/base/driver.rb +39 -2
- data/lib/appium_lib_core/ios/xcuitest/device.rb +2 -0
- data/lib/appium_lib_core/version.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bc2aa50584358befc50090e67d4ed486106317407b3e5093c47f9c485a6007e
|
4
|
+
data.tar.gz: 4954f6cbcb5c50884c30e4b1a067a54a6a2dab6b2c481008bdc3d97fbc245898
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60f862a82f1cc3f6e3c82547f03733795a18080042152a45608cb1cf0765835a248f7312095e4bb158660004480857ed574445aaf82fb316968cda7b3d9b4aab
|
7
|
+
data.tar.gz: b02fd3aac35b3faff5ac120de17c51228abe5e2bc709c19e1393ddef148284cca50a7380247f399e3d7766d07627d32f0d686bf1081cae5c2dfd49c813c515e8
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,13 @@ Read `release_notes.md` for commit level details.
|
|
10
10
|
|
11
11
|
### Deprecations
|
12
12
|
|
13
|
+
|
14
|
+
## [7.3.0] - 2023-10-17
|
15
|
+
|
16
|
+
### Deprecations
|
17
|
+
- Add deprecation marks that will be removed from Appium or this library to move to extension commands such as `mobile:`
|
18
|
+
- https://github.com/appium/ruby_lib_core/pull/504
|
19
|
+
|
13
20
|
## [7.2.0] - 2023-10-13
|
14
21
|
|
15
22
|
### Enhancements
|
data/appium_lib_core.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
31
31
|
spec.add_development_dependency 'minitest-reporters', '~> 1.1'
|
32
32
|
spec.add_development_dependency 'webmock', '~> 3.19.0'
|
33
|
-
spec.add_development_dependency 'rubocop', '1.57.
|
33
|
+
spec.add_development_dependency 'rubocop', '1.57.1'
|
34
34
|
spec.add_development_dependency 'appium_thor', '~> 1.0'
|
35
35
|
spec.add_development_dependency 'parallel_tests'
|
36
36
|
spec.add_development_dependency 'simplecov'
|
@@ -20,6 +20,8 @@ module Appium
|
|
20
20
|
def self.add_methods
|
21
21
|
::Appium::Core::Device.add_endpoint_method(:finger_print) do
|
22
22
|
def finger_print(finger_id)
|
23
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: fingerprint' extension instead"
|
24
|
+
|
23
25
|
unless (1..10).cover? finger_id.to_i
|
24
26
|
raise ::Appium::Core::Error::ArgumentError,
|
25
27
|
"finger_id should be integer between 1 to 10. Not #{finger_id}"
|
@@ -20,24 +20,32 @@ module Appium
|
|
20
20
|
def self.add_methods
|
21
21
|
::Appium::Core::Device.add_endpoint_method(:get_network_connection) do
|
22
22
|
def get_network_connection
|
23
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: getConnectivity' extension instead"
|
24
|
+
|
23
25
|
execute :get_network_connection
|
24
26
|
end
|
25
27
|
end
|
26
28
|
|
27
29
|
::Appium::Core::Device.add_endpoint_method(:toggle_wifi) do
|
28
30
|
def toggle_wifi
|
31
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: setConnectivity' extension instead"
|
32
|
+
|
29
33
|
execute :toggle_wifi
|
30
34
|
end
|
31
35
|
end
|
32
36
|
|
33
37
|
::Appium::Core::Device.add_endpoint_method(:toggle_data) do
|
34
38
|
def toggle_data
|
39
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: setConnectivity' extension instead"
|
40
|
+
|
35
41
|
execute :toggle_data
|
36
42
|
end
|
37
43
|
end
|
38
44
|
|
39
45
|
::Appium::Core::Device.add_endpoint_method(:set_network_connection) do
|
40
46
|
def set_network_connection(mode)
|
47
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: setConnectivity' extension instead"
|
48
|
+
|
41
49
|
# same as ::Selenium::WebDriver::DriverExtensions::HasNetworkConnection
|
42
50
|
# But this method accept number
|
43
51
|
connection_type = { airplane_mode: 1, wifi: 2, data: 4, all: 6, none: 0 }
|
@@ -49,6 +57,8 @@ module Appium
|
|
49
57
|
|
50
58
|
::Appium::Core::Device.add_endpoint_method(:toggle_airplane_mode) do
|
51
59
|
def toggle_airplane_mode
|
60
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: setConnectivity' extension instead"
|
61
|
+
|
52
62
|
execute :toggle_airplane_mode
|
53
63
|
end
|
54
64
|
alias_method :toggle_flight_mode, :toggle_airplane_mode
|
@@ -20,12 +20,15 @@ module Appium
|
|
20
20
|
def self.add_methods
|
21
21
|
::Appium::Core::Device.add_endpoint_method(:get_performance_data_types) do
|
22
22
|
def get_performance_data_types
|
23
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: getPerformanceDataTypes' extension instead"
|
23
24
|
execute :get_performance_data_types
|
24
25
|
end
|
25
26
|
end
|
26
27
|
|
27
28
|
::Appium::Core::Device.add_endpoint_method(:get_performance_data) do
|
28
29
|
def get_performance_data(package_name:, data_type:, data_read_timeout: 1000)
|
30
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: getPerformanceData' extension instead"
|
31
|
+
|
29
32
|
execute(:get_performance_data, {},
|
30
33
|
packageName: package_name, dataType: data_type, dataReadTimeout: data_read_timeout)
|
31
34
|
end
|
@@ -20,6 +20,8 @@ module Appium
|
|
20
20
|
def self.add_methods
|
21
21
|
::Appium::Core::Device.add_endpoint_method(:get_display_density) do
|
22
22
|
def get_display_density
|
23
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: getDisplayDensity' extension instead"
|
24
|
+
|
23
25
|
execute :get_display_density
|
24
26
|
end
|
25
27
|
end
|
@@ -27,6 +27,7 @@ module Appium
|
|
27
27
|
|
28
28
|
# rubocop:disable Layout/LineLength
|
29
29
|
|
30
|
+
# @deprecated Use 'mobile: openNotifications' extension instead.
|
30
31
|
# @!method open_notifications
|
31
32
|
# Open Android notifications
|
32
33
|
#
|
@@ -35,6 +36,7 @@ module Appium
|
|
35
36
|
# @driver.open_notifications
|
36
37
|
#
|
37
38
|
|
39
|
+
# @deprecated Use 'mobile: getCurrentActivity' extension instead.
|
38
40
|
# @!method current_activity
|
39
41
|
# Get current activity name
|
40
42
|
# @return [String] An activity name
|
@@ -44,6 +46,7 @@ module Appium
|
|
44
46
|
# @driver.current_activity # '.ApiDemos'
|
45
47
|
#
|
46
48
|
|
49
|
+
# @deprecated Use 'mobile: getCurrentPackage' extension instead.
|
47
50
|
# @!method current_package
|
48
51
|
# Get current package name
|
49
52
|
# @return [String] A package name
|
@@ -53,6 +56,7 @@ module Appium
|
|
53
56
|
# @driver.current_package # 'com.example.android.apis'
|
54
57
|
#
|
55
58
|
|
59
|
+
# @deprecated Use 'mobile: getSystemBars' extension instead.
|
56
60
|
# @!method get_system_bars
|
57
61
|
# Get system bar's information
|
58
62
|
# @return [String]
|
@@ -63,6 +67,7 @@ module Appium
|
|
63
67
|
# @driver.system_bars
|
64
68
|
#
|
65
69
|
|
70
|
+
# @deprecated Use 'mobile: getDisplayDensity' extension instead.
|
66
71
|
# @!method get_display_density
|
67
72
|
# Get connected device's density.
|
68
73
|
# @return [Integer] The size of density
|
@@ -72,6 +77,7 @@ module Appium
|
|
72
77
|
# @driver.get_display_density # 320
|
73
78
|
#
|
74
79
|
|
80
|
+
# @deprecated Use 'mobile: getConnectivity' extension instead.
|
75
81
|
# @!method get_network_connection
|
76
82
|
# Get the device network connection current status
|
77
83
|
# See set_network_connection method for return value
|
@@ -86,6 +92,7 @@ module Appium
|
|
86
92
|
# @driver.get_network_connection #=> 6
|
87
93
|
#
|
88
94
|
|
95
|
+
# @deprecated Use 'mobile: getConnectivity' extension instead.
|
89
96
|
# @!method toggle_wifi
|
90
97
|
# Switch the state of the wifi service only for Android
|
91
98
|
#
|
@@ -96,6 +103,7 @@ module Appium
|
|
96
103
|
# @driver.toggle_wifi
|
97
104
|
#
|
98
105
|
|
106
|
+
# @deprecated Use 'mobile: getConnectivity' extension instead.
|
99
107
|
# @!method toggle_data
|
100
108
|
# Switch the state of data service only for Android, and the device should be rooted
|
101
109
|
#
|
@@ -106,6 +114,7 @@ module Appium
|
|
106
114
|
# @driver.toggle_data
|
107
115
|
#
|
108
116
|
|
117
|
+
# @deprecated Use 'mobile: getConnectivity' extension instead.
|
109
118
|
# @!method location
|
110
119
|
# Get the location of the device.
|
111
120
|
#
|
@@ -143,6 +152,7 @@ module Appium
|
|
143
152
|
# driver.set_location 10, 10, 0
|
144
153
|
#
|
145
154
|
|
155
|
+
# @deprecated Use 'mobile: toggleGps' extension instead.
|
146
156
|
# @!method toggle_location_services
|
147
157
|
# Switch the state of the location service
|
148
158
|
#
|
@@ -153,6 +163,7 @@ module Appium
|
|
153
163
|
# @driver.toggle_location_services
|
154
164
|
#
|
155
165
|
|
166
|
+
# @deprecated Use 'mobile: getConnectivity' extension instead.
|
156
167
|
# @!method toggle_airplane_mode
|
157
168
|
# Toggle flight mode on or off
|
158
169
|
#
|
@@ -161,6 +172,7 @@ module Appium
|
|
161
172
|
# @driver.toggle_airplane_mode
|
162
173
|
#
|
163
174
|
|
175
|
+
# @deprecated Use 'mobile: hideKeyboard' extension instead.
|
164
176
|
# @!method hide_keyboard(close_key = nil, strategy = nil)
|
165
177
|
# Hide the onscreen keyboard
|
166
178
|
# @param [String] close_key The name of the key which closes the keyboard.
|
@@ -176,12 +188,14 @@ module Appium
|
|
176
188
|
# @driver.hide_keyboard(nil, :tapOutside) # Close a keyboard with tapping out side of keyboard
|
177
189
|
#
|
178
190
|
|
191
|
+
# @deprecated The method no longer exists. This method will be removed.
|
179
192
|
# @!method end_coverage(path, intent)
|
180
193
|
# Android only; Ends the test coverage and writes the results to the given path on device.
|
181
194
|
# @param [String] path Path on the device to write too.
|
182
195
|
# @param [String] intent Intent to broadcast when ending coverage.
|
183
196
|
#
|
184
197
|
|
198
|
+
# @deprecated Use 'mobile: startActivity' extension instead.
|
185
199
|
# @!method start_activity(opts)
|
186
200
|
# Android only. Start a new activity within the current app or launch a new app and start the target activity.
|
187
201
|
#
|
@@ -206,6 +220,7 @@ module Appium
|
|
206
220
|
# app_activity: '.accessibility.AccessibilityNodeProviderActivity'
|
207
221
|
#
|
208
222
|
|
223
|
+
# @deprecated Use 'mobile: setConnectivity' extension instead.
|
209
224
|
# @!method set_network_connection(mode)
|
210
225
|
# Set the device network connection mode
|
211
226
|
# Same as +#network_connection_type+ in selenium-webdriver.
|
@@ -228,6 +243,7 @@ module Appium
|
|
228
243
|
# @driver.network_connection_type = :airplane_mode # As selenium-webdriver
|
229
244
|
#
|
230
245
|
|
246
|
+
# @deprecated Use 'mobile: getPerformanceDataTypes' extension instead.
|
231
247
|
# @!method get_performance_data_types
|
232
248
|
# Get the information type of the system state which is supported to read such as
|
233
249
|
# cpu, memory, network, battery via adb commands.
|
@@ -238,6 +254,7 @@ module Appium
|
|
238
254
|
# @driver.get_performance_data_types #=> ["cpuinfo", "batteryinfo", "networkinfo", "memoryinfo"]
|
239
255
|
#
|
240
256
|
|
257
|
+
# @deprecated Use 'mobile: getPerformanceData' extension instead.
|
241
258
|
# @!method get_performance_data(package_name:, data_type:, data_read_timeout: 1000)
|
242
259
|
# Get the resource usage information of the application.
|
243
260
|
# https://github.com/appium/appium-base-driver/blob/be29aec2318316d12b5c3295e924a5ba8f09b0fb/lib/mjsonwp/routes.js#L303
|
@@ -317,6 +334,7 @@ module Appium
|
|
317
334
|
# @driver.set_clipboard(content: 'happy testing') #=> {"protocol"=>"W3C"}
|
318
335
|
#
|
319
336
|
|
337
|
+
# @deprecated Use 'mobile: fingerprint' extension instead.
|
320
338
|
# @!method finger_print(finger_id)
|
321
339
|
# Authenticate users by using their finger print scans on supported emulators.
|
322
340
|
#
|
@@ -356,42 +374,56 @@ module Appium
|
|
356
374
|
|
357
375
|
::Appium::Core::Device.add_endpoint_method(:open_notifications) do
|
358
376
|
def open_notifications
|
377
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: openNotifications' extension instead"
|
378
|
+
|
359
379
|
execute :open_notifications
|
360
380
|
end
|
361
381
|
end
|
362
382
|
|
363
383
|
::Appium::Core::Device.add_endpoint_method(:current_activity) do
|
364
384
|
def current_activity
|
385
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: getCurrentActivity' extension instead"
|
386
|
+
|
365
387
|
execute :current_activity
|
366
388
|
end
|
367
389
|
end
|
368
390
|
|
369
391
|
::Appium::Core::Device.add_endpoint_method(:current_package) do
|
370
392
|
def current_package
|
393
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: getCurrentPackage' extension instead"
|
394
|
+
|
371
395
|
execute :current_package
|
372
396
|
end
|
373
397
|
end
|
374
398
|
|
375
399
|
::Appium::Core::Device.add_endpoint_method(:get_system_bars) do
|
376
400
|
def get_system_bars
|
401
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: getSystemBars' extension instead"
|
402
|
+
|
377
403
|
execute :get_system_bars
|
378
404
|
end
|
379
405
|
end
|
380
406
|
# as alias to get_system_bars
|
381
407
|
::Appium::Core::Device.add_endpoint_method(:system_bars) do
|
382
408
|
def system_bars
|
409
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: getSystemBars' extension instead"
|
410
|
+
|
383
411
|
execute :get_system_bars
|
384
412
|
end
|
385
413
|
end
|
386
414
|
|
387
415
|
::Appium::Core::Device.add_endpoint_method(:toggle_location_services) do
|
388
416
|
def toggle_location_services
|
417
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: toggleGps' extension instead"
|
418
|
+
|
389
419
|
execute :toggle_location_services
|
390
420
|
end
|
391
421
|
end
|
392
422
|
|
393
423
|
::Appium::Core::Device.add_endpoint_method(:start_activity) do
|
394
424
|
def start_activity(opts)
|
425
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: startActivity' extension instead"
|
426
|
+
|
395
427
|
raise 'opts must be a hash' unless opts.is_a? Hash
|
396
428
|
|
397
429
|
option = {}
|
@@ -429,6 +461,8 @@ module Appium
|
|
429
461
|
# Android, Override included method in bridge
|
430
462
|
::Appium::Core::Device.add_endpoint_method(:hide_keyboard) do
|
431
463
|
def hide_keyboard(close_key = nil, strategy = nil)
|
464
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: hideKeyboard' extension instead"
|
465
|
+
|
432
466
|
option = {}
|
433
467
|
|
434
468
|
option[:key] = close_key if close_key
|
@@ -441,6 +475,8 @@ module Appium
|
|
441
475
|
# Android, Override included method in bridge
|
442
476
|
::Appium::Core::Device.add_endpoint_method(:background_app) do
|
443
477
|
def background_app(duration = 0)
|
478
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: backgroundApp' extension instead"
|
479
|
+
|
444
480
|
execute :background_app, {}, seconds: duration
|
445
481
|
end
|
446
482
|
end
|
@@ -448,6 +484,7 @@ module Appium
|
|
448
484
|
# TODO: TEST ME
|
449
485
|
::Appium::Core::Device.add_endpoint_method(:end_coverage) do
|
450
486
|
def end_coverage(path, intent)
|
487
|
+
::Appium::Logger.warn '[DEPRECATION] The method no longer exists. This method will be removed.'
|
451
488
|
execute :end_coverage, {}, path: path, intent: intent
|
452
489
|
end
|
453
490
|
end
|
@@ -224,6 +224,7 @@ module Appium
|
|
224
224
|
)
|
225
225
|
end
|
226
226
|
|
227
|
+
# @deprecated Use 'mobile: lock' extension instead.
|
227
228
|
# Lock the device
|
228
229
|
# @return [String]
|
229
230
|
#
|
@@ -234,9 +235,11 @@ module Appium
|
|
234
235
|
# # Block other commands during locking the device.
|
235
236
|
#
|
236
237
|
def lock(duration = nil)
|
238
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: lock' extension instead"
|
237
239
|
@bridge.lock(duration)
|
238
240
|
end
|
239
241
|
|
242
|
+
# @deprecated Use 'mobile: isLocked' extension instead.
|
240
243
|
# Check current device status is weather locked or not
|
241
244
|
#
|
242
245
|
# @example
|
@@ -245,10 +248,12 @@ module Appium
|
|
245
248
|
# @driver.locked?
|
246
249
|
#
|
247
250
|
def locked?
|
251
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: isLocked' extension instead"
|
248
252
|
@bridge.device_locked?
|
249
253
|
end
|
250
254
|
alias device_locked? locked?
|
251
255
|
|
256
|
+
# @deprecated Use 'mobile: unlock' extension instead.
|
252
257
|
# Unlock the device
|
253
258
|
#
|
254
259
|
# @example
|
@@ -256,9 +261,11 @@ module Appium
|
|
256
261
|
# @driver.unlock
|
257
262
|
#
|
258
263
|
def unlock
|
264
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: unlock' extension instead"
|
259
265
|
@bridge.unlock
|
260
266
|
end
|
261
267
|
|
268
|
+
# @deprecated Use 'mobile: hideKeyboard' extension instead.
|
262
269
|
# Hide the onscreen keyboard
|
263
270
|
# @param [String] close_key The name of the key which closes the keyboard.
|
264
271
|
# Defaults to 'Done' for iOS(except for XCUITest).
|
@@ -273,9 +280,11 @@ module Appium
|
|
273
280
|
# @driver.hide_keyboard(nil, :tapOutside) # Close a keyboard with tapping out side of keyboard
|
274
281
|
#
|
275
282
|
def hide_keyboard(close_key = nil, strategy = nil)
|
283
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: hideKeyboard' extension instead"
|
276
284
|
@bridge.hide_keyboard close_key, strategy
|
277
285
|
end
|
278
286
|
|
287
|
+
# @deprecated Use 'mobile: isKeyboardShown' extension instead.
|
279
288
|
# Get whether keyboard is displayed or not.
|
280
289
|
# @return [Boolean] Return true if keyboard is shown. Return false if keyboard is hidden.
|
281
290
|
#
|
@@ -284,6 +293,7 @@ module Appium
|
|
284
293
|
# @driver.keyboard_shown? # true
|
285
294
|
#
|
286
295
|
def keyboard_shown?
|
296
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: isKeyboardShown' extension instead"
|
287
297
|
@bridge.is_keyboard_shown
|
288
298
|
end
|
289
299
|
alias is_keyboard_shown keyboard_shown?
|
@@ -327,6 +337,7 @@ module Appium
|
|
327
337
|
end
|
328
338
|
alias update_settings settings=
|
329
339
|
|
340
|
+
# @deprecated Use 'mobile: shell' extension instead.
|
330
341
|
# Returns an instance of DeviceIME
|
331
342
|
#
|
332
343
|
# @return [Appium::Core::Base::Driver::DeviceIME]
|
@@ -340,9 +351,11 @@ module Appium
|
|
340
351
|
# @driver.ime.deactivate #=> Deactivate current IME engine
|
341
352
|
#
|
342
353
|
def ime
|
354
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: shell' extension instead"
|
343
355
|
@ime ||= DeviceIME.new(@bridge)
|
344
356
|
end
|
345
357
|
|
358
|
+
# @deprecated Use 'mobile: shell' extension instead.
|
346
359
|
# Android only. Make an engine that is available active.
|
347
360
|
#
|
348
361
|
# @param [String] ime_name The IME owning the activity [required]
|
@@ -356,6 +369,7 @@ module Appium
|
|
356
369
|
ime.activate(ime_name)
|
357
370
|
end
|
358
371
|
|
372
|
+
# @deprecated Use 'mobile: shell' extension instead.
|
359
373
|
# Android only. List all available input engines on the machine.
|
360
374
|
#
|
361
375
|
# @example
|
@@ -367,6 +381,7 @@ module Appium
|
|
367
381
|
ime.available_engines
|
368
382
|
end
|
369
383
|
|
384
|
+
# @deprecated Use 'mobile: shell' extension instead.
|
370
385
|
# Android only. Get the name of the active IME engine.
|
371
386
|
#
|
372
387
|
# @example
|
@@ -378,6 +393,7 @@ module Appium
|
|
378
393
|
ime.active_engine
|
379
394
|
end
|
380
395
|
|
396
|
+
# @deprecated Use 'mobile: shell' extension instead.
|
381
397
|
# @!method ime_activated
|
382
398
|
# Android only. Indicates whether IME input is active at the moment (not if it is available).
|
383
399
|
#
|
@@ -392,6 +408,7 @@ module Appium
|
|
392
408
|
ime.activated?
|
393
409
|
end
|
394
410
|
|
411
|
+
# @deprecated Use 'mobile: shell' extension instead.
|
395
412
|
# Android only. De-activates the currently-active IME engine.
|
396
413
|
#
|
397
414
|
# @example
|
@@ -477,6 +494,7 @@ module Appium
|
|
477
494
|
# @driver.push_file "/sdcard/Pictures", file # Push a file binary to /sdcard/Pictures path in Android
|
478
495
|
#
|
479
496
|
def push_file(path, filedata)
|
497
|
+
# TODO: use 'mobile: pushFile' internally
|
480
498
|
@bridge.push_file(path, filedata)
|
481
499
|
end
|
482
500
|
|
@@ -505,6 +523,7 @@ module Appium
|
|
505
523
|
# File.open('proper_filename', 'wb') { |f| f<< decoded_file }
|
506
524
|
#
|
507
525
|
def pull_file(path)
|
526
|
+
# TODO: use 'mobile: pullFile' internally
|
508
527
|
@bridge.pull_file(path)
|
509
528
|
end
|
510
529
|
|
@@ -530,9 +549,11 @@ module Appium
|
|
530
549
|
# File.open('proper_filename', 'wb') { |f| f<< decoded_file }
|
531
550
|
#
|
532
551
|
def pull_folder(path)
|
552
|
+
# TODO: use 'mobile: pullFolder' internally
|
533
553
|
@bridge.pull_folder(path)
|
534
554
|
end
|
535
555
|
|
556
|
+
# @deprecated Use 'mobile: pressKey' extension instead.
|
536
557
|
# Press keycode on the device.
|
537
558
|
# http://developer.android.com/reference/android/view/KeyEvent.html
|
538
559
|
# @param [Integer] key The key to press. The values which have +KEYCODE_+ prefix in http://developer.android.com/reference/android/view/KeyEvent.html
|
@@ -552,9 +573,11 @@ module Appium
|
|
552
573
|
# @driver.press_keycode 66, metastate: [1], flags: [32]
|
553
574
|
#
|
554
575
|
def press_keycode(key, metastate: [], flags: [])
|
576
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: pressKey' extension instead"
|
555
577
|
@bridge.press_keycode(key, metastate: metastate, flags: flags)
|
556
578
|
end
|
557
579
|
|
580
|
+
# @deprecated Use 'mobile: pressKey' extension instead.
|
558
581
|
# Long press keycode on the device.
|
559
582
|
# http://developer.android.com/reference/android/view/KeyEvent.html
|
560
583
|
# @param [Integer] key The key to long press. The values which have +KEYCODE_+ prefix in http://developer.android.com/reference/android/view/KeyEvent.html
|
@@ -574,10 +597,11 @@ module Appium
|
|
574
597
|
# @driver.long_press_keycode 66, metastate: [1], flags: [32, 8192]
|
575
598
|
#
|
576
599
|
def long_press_keycode(key, metastate: [], flags: [])
|
600
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: pressKey' extension instead"
|
577
601
|
@bridge.long_press_keycode(key, metastate: metastate, flags: flags)
|
578
602
|
end
|
579
603
|
|
580
|
-
# @deprecated
|
604
|
+
# @deprecated Will be removed, or use 'windows: launchApp' extension instead for Windows.
|
581
605
|
# Start the simulator and application configured with desired capabilities
|
582
606
|
#
|
583
607
|
# @example
|
@@ -588,7 +612,7 @@ module Appium
|
|
588
612
|
@bridge.launch_app
|
589
613
|
end
|
590
614
|
|
591
|
-
# @deprecated
|
615
|
+
# @deprecated Will be removed, or use 'windows: closeApp' extension instead for Windows.
|
592
616
|
# Close an app on device
|
593
617
|
#
|
594
618
|
# @example
|
@@ -614,6 +638,7 @@ module Appium
|
|
614
638
|
@bridge.reset
|
615
639
|
end
|
616
640
|
|
641
|
+
# @deprecated Use 'mobile: getAppStrings' extension instead.
|
617
642
|
# Return the hash of all localization strings.
|
618
643
|
# @return [Hash]
|
619
644
|
#
|
@@ -622,9 +647,11 @@ module Appium
|
|
622
647
|
# @driver.app_strings #=> "TransitionsTitle"=>"Transitions", "WebTitle"=>"Web"
|
623
648
|
#
|
624
649
|
def app_strings(language = nil)
|
650
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: getAppStrings' extension instead"
|
625
651
|
@bridge.app_strings(language)
|
626
652
|
end
|
627
653
|
|
654
|
+
# @deprecated Use 'mobile: backgroundApp' extension instead.
|
628
655
|
# Backgrounds the app for a set number of seconds.
|
629
656
|
# This is a blocking application
|
630
657
|
# @param [Integer] duration How many seconds to background the app for.
|
@@ -667,6 +694,7 @@ module Appium
|
|
667
694
|
# @driver.install_app("/path/to/test.ipa", timeoutMs: 20000)
|
668
695
|
#
|
669
696
|
def install_app(path, **options)
|
697
|
+
# TODO: use mobile command in the background?
|
670
698
|
options = options.transform_keys { |key| key.to_s.gsub(/_./) { |v| v[1].upcase } } unless options.nil?
|
671
699
|
@bridge.install_app(path, options)
|
672
700
|
end
|
@@ -687,6 +715,7 @@ module Appium
|
|
687
715
|
# @driver.remove_app("io.appium.bundle", keep_data: false, timeout, 10000)
|
688
716
|
#
|
689
717
|
def remove_app(app_id, keep_data: nil, timeout: nil)
|
718
|
+
# TODO: use mobile command in the background?
|
690
719
|
@bridge.remove_app(app_id, keep_data: keep_data, timeout: timeout)
|
691
720
|
end
|
692
721
|
|
@@ -698,6 +727,7 @@ module Appium
|
|
698
727
|
# @driver.app_installed?("io.appium.bundle")
|
699
728
|
#
|
700
729
|
def app_installed?(app_id)
|
730
|
+
# TODO: use mobile command in the background?
|
701
731
|
@bridge.app_installed?(app_id)
|
702
732
|
end
|
703
733
|
|
@@ -709,6 +739,7 @@ module Appium
|
|
709
739
|
# @driver.activate_app("io.appium.bundle") #=> {}
|
710
740
|
#
|
711
741
|
def activate_app(app_id)
|
742
|
+
# TODO: use mobile command in the background?
|
712
743
|
@bridge.activate_app(app_id)
|
713
744
|
end
|
714
745
|
|
@@ -725,6 +756,7 @@ module Appium
|
|
725
756
|
# @driver.terminate_app("io.appium.bundle", timeout: 500)
|
726
757
|
#
|
727
758
|
def terminate_app(app_id, timeout: nil)
|
759
|
+
# TODO: use mobile command in the background?
|
728
760
|
@bridge.terminate_app(app_id, timeout: timeout)
|
729
761
|
end
|
730
762
|
|
@@ -748,6 +780,7 @@ module Appium
|
|
748
780
|
# @driver.query_app_state("io.appium.bundle") #=> :not_running
|
749
781
|
#
|
750
782
|
def app_state(app_id)
|
783
|
+
# TODO: use mobile command in the background?
|
751
784
|
@bridge.app_state(app_id)
|
752
785
|
end
|
753
786
|
alias query_app_state app_state
|
@@ -787,6 +820,7 @@ module Appium
|
|
787
820
|
@bridge.stop_and_save_recording_screen(file_path)
|
788
821
|
end
|
789
822
|
|
823
|
+
# @deprecated Use 'mobile: shake' extension instead.
|
790
824
|
# Cause the device to shake
|
791
825
|
#
|
792
826
|
# @example
|
@@ -794,9 +828,11 @@ module Appium
|
|
794
828
|
# @driver.shake
|
795
829
|
#
|
796
830
|
def shake
|
831
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: shake' extension instead"
|
797
832
|
@bridge.shake
|
798
833
|
end
|
799
834
|
|
835
|
+
# @deprecated Use 'mobile: getDeviceTime' extension instead.
|
800
836
|
# Get the time on the device
|
801
837
|
#
|
802
838
|
# @param [String] format The set of format specifiers. Read https://momentjs.com/docs/ to get
|
@@ -810,6 +846,7 @@ module Appium
|
|
810
846
|
# @driver.device_time "YYYY-MM-DD" #=> "2018-06-12"
|
811
847
|
#
|
812
848
|
def device_time(format = nil)
|
849
|
+
::Appium::Logger.warn "[DEPRECATION] Please use 'mobile: getDeviceTime' extension instead"
|
813
850
|
@bridge.device_time(format)
|
814
851
|
end
|
815
852
|
|
@@ -25,6 +25,7 @@ module Appium
|
|
25
25
|
|
26
26
|
# rubocop:disable Layout/LineLength
|
27
27
|
|
28
|
+
# @deprecated Use 'mobile: hideKeyboard' extension instead.
|
28
29
|
# @!method hide_keyboard(close_key = nil, strategy = nil)
|
29
30
|
# Hide the onscreen keyboard
|
30
31
|
# @param [String] close_key The name of the key which closes the keyboard.
|
@@ -38,6 +39,7 @@ module Appium
|
|
38
39
|
# @driver.hide_keyboard('Finished') # Close a keyboard with the 'Finished' button
|
39
40
|
#
|
40
41
|
|
42
|
+
# @deprecated Use 'mobile: backgroundApp' extension instead.
|
41
43
|
# @!method background_app(duration = 0)
|
42
44
|
# Backgrounds the app for a set number of seconds.
|
43
45
|
# This is a blocking application.
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
module Appium
|
16
16
|
module Core
|
17
|
-
VERSION = '7.
|
18
|
-
DATE = '2023-10-
|
17
|
+
VERSION = '7.3.0' unless defined? ::Appium::Core::VERSION
|
18
|
+
DATE = '2023-10-17' unless defined? ::Appium::Core::DATE
|
19
19
|
end
|
20
20
|
end
|
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: 7.
|
4
|
+
version: 7.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuaki MATSUO
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|
@@ -120,14 +120,14 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - '='
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 1.57.
|
123
|
+
version: 1.57.1
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - '='
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 1.57.
|
130
|
+
version: 1.57.1
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: appium_thor
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|