appium_lib_core 3.0.2 → 3.0.3

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 (78) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +7 -2
  3. data/CHANGELOG.md +9 -0
  4. data/lib/appium_lib_core.rb +14 -0
  5. data/lib/appium_lib_core/android.rb +14 -0
  6. data/lib/appium_lib_core/android/device.rb +14 -0
  7. data/lib/appium_lib_core/android/device/auth_finger_print.rb +14 -0
  8. data/lib/appium_lib_core/android/device/clipboard.rb +14 -0
  9. data/lib/appium_lib_core/android/device/emulator.rb +14 -0
  10. data/lib/appium_lib_core/android/device/network.rb +14 -0
  11. data/lib/appium_lib_core/android/device/performance.rb +14 -0
  12. data/lib/appium_lib_core/android/device/screen.rb +14 -0
  13. data/lib/appium_lib_core/android/espresso/bridge.rb +14 -0
  14. data/lib/appium_lib_core/android/uiautomator1/bridge.rb +14 -0
  15. data/lib/appium_lib_core/android/uiautomator2/bridge.rb +14 -0
  16. data/lib/appium_lib_core/android/uiautomator2/device.rb +14 -0
  17. data/lib/appium_lib_core/android/uiautomator2/device/battery.rb +14 -0
  18. data/lib/appium_lib_core/android_espresso.rb +14 -0
  19. data/lib/appium_lib_core/android_uiautomator2.rb +14 -0
  20. data/lib/appium_lib_core/common.rb +14 -0
  21. data/lib/appium_lib_core/common/base.rb +14 -0
  22. data/lib/appium_lib_core/common/base/bridge.rb +15 -1
  23. data/lib/appium_lib_core/common/base/bridge/mjsonwp.rb +14 -0
  24. data/lib/appium_lib_core/common/base/bridge/w3c.rb +14 -0
  25. data/lib/appium_lib_core/common/base/capabilities.rb +14 -0
  26. data/lib/appium_lib_core/common/base/command.rb +14 -0
  27. data/lib/appium_lib_core/common/base/driver.rb +16 -2
  28. data/lib/appium_lib_core/common/base/http_default.rb +14 -0
  29. data/lib/appium_lib_core/common/base/platform.rb +14 -0
  30. data/lib/appium_lib_core/common/base/screenshot.rb +14 -0
  31. data/lib/appium_lib_core/common/base/search_context.rb +14 -0
  32. data/lib/appium_lib_core/common/command.rb +14 -0
  33. data/lib/appium_lib_core/common/command/common.rb +77 -63
  34. data/lib/appium_lib_core/common/command/mjsonwp.rb +15 -1
  35. data/lib/appium_lib_core/common/command/w3c.rb +30 -16
  36. data/lib/appium_lib_core/common/device/app_management.rb +14 -0
  37. data/lib/appium_lib_core/common/device/app_state.rb +14 -0
  38. data/lib/appium_lib_core/common/device/battery_status.rb +14 -0
  39. data/lib/appium_lib_core/common/device/clipboard_content_type.rb +14 -0
  40. data/lib/appium_lib_core/common/device/context.rb +14 -0
  41. data/lib/appium_lib_core/common/device/device.rb +14 -0
  42. data/lib/appium_lib_core/common/device/device_lock.rb +14 -0
  43. data/lib/appium_lib_core/common/device/file_management.rb +14 -0
  44. data/lib/appium_lib_core/common/device/image_comparison.rb +14 -0
  45. data/lib/appium_lib_core/common/device/ime_actions.rb +14 -0
  46. data/lib/appium_lib_core/common/device/keyboard.rb +14 -0
  47. data/lib/appium_lib_core/common/device/keyevent.rb +14 -0
  48. data/lib/appium_lib_core/common/device/screen_record.rb +14 -0
  49. data/lib/appium_lib_core/common/device/setting.rb +14 -0
  50. data/lib/appium_lib_core/common/device/touch_actions.rb +14 -0
  51. data/lib/appium_lib_core/common/device/value.rb +14 -0
  52. data/lib/appium_lib_core/common/error.rb +14 -0
  53. data/lib/appium_lib_core/common/log.rb +14 -0
  54. data/lib/appium_lib_core/common/logger.rb +14 -0
  55. data/lib/appium_lib_core/common/touch_action/multi_touch.rb +14 -0
  56. data/lib/appium_lib_core/common/touch_action/touch_actions.rb +14 -0
  57. data/lib/appium_lib_core/common/wait.rb +17 -3
  58. data/lib/appium_lib_core/common/wait/timer.rb +14 -0
  59. data/lib/appium_lib_core/common/ws/websocket.rb +14 -0
  60. data/lib/appium_lib_core/device.rb +14 -0
  61. data/lib/appium_lib_core/driver.rb +22 -2
  62. data/lib/appium_lib_core/ios.rb +14 -0
  63. data/lib/appium_lib_core/ios/device.rb +14 -0
  64. data/lib/appium_lib_core/ios/device/clipboard.rb +14 -0
  65. data/lib/appium_lib_core/ios/uiautomation/bridge.rb +14 -0
  66. data/lib/appium_lib_core/ios/uiautomation/device.rb +14 -0
  67. data/lib/appium_lib_core/ios/uiautomation/patch.rb +14 -0
  68. data/lib/appium_lib_core/ios/xcuitest/bridge.rb +14 -0
  69. data/lib/appium_lib_core/ios/xcuitest/device.rb +14 -0
  70. data/lib/appium_lib_core/ios/xcuitest/device/battery.rb +14 -0
  71. data/lib/appium_lib_core/ios/xcuitest/device/performance.rb +14 -0
  72. data/lib/appium_lib_core/ios/xcuitest/device/screen.rb +14 -0
  73. data/lib/appium_lib_core/ios_xcuitest.rb +14 -0
  74. data/lib/appium_lib_core/patch.rb +14 -0
  75. data/lib/appium_lib_core/version.rb +16 -2
  76. data/release_notes.md +6 -0
  77. data/script/commands.rb +15 -1
  78. metadata +2 -2
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Core
3
17
  class Base
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Core
3
17
  class Base
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  require 'base64'
2
16
  require_relative 'search_context'
3
17
  require_relative 'screenshot'
@@ -160,7 +174,7 @@ module Appium
160
174
  # @driver.settings.update('allowInvisibleElements': true)
161
175
  #
162
176
  def settings
163
- @driver_settings ||= DriverSettings.new(@bridge)
177
+ @driver_settings ||= DriverSettings.new(@bridge) # rubocop:disable Naming/MemoizedInstanceVariableName
164
178
  end
165
179
 
166
180
  # Get appium Settings for current test session.
@@ -230,7 +244,7 @@ module Appium
230
244
  # @driver.ime.deactivate #=> Deactivate current IME engine
231
245
  #
232
246
  def ime
233
- @device_ime ||= DeviceIME.new(@bridge)
247
+ @device_ime ||= DeviceIME.new(@bridge) # rubocop:disable Naming/MemoizedInstanceVariableName
234
248
  end
235
249
 
236
250
  # Android only. Make an engine that is available active.
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  require_relative '../../version'
2
16
 
3
17
  module Appium
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Core
3
17
  class Base
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Core
3
17
  class Base
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Core
3
17
  class Base
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  require_relative 'base/command'
2
16
  require_relative 'command/common'
3
17
  require_relative 'command/mjsonwp'
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  # rubocop:disable Layout/AlignHash
2
16
  module Appium
3
17
  module Core
@@ -6,82 +20,82 @@ module Appium
6
20
  # Some commands differ for each driver.
7
21
  COMMAND = {
8
22
  # common
9
- available_contexts: [:get, 'session/:session_id/contexts'.freeze],
10
- set_context: [:post, 'session/:session_id/context'.freeze],
11
- current_context: [:get, 'session/:session_id/context'.freeze],
23
+ available_contexts: [:get, 'session/:session_id/contexts'],
24
+ set_context: [:post, 'session/:session_id/context'],
25
+ current_context: [:get, 'session/:session_id/context'],
12
26
 
13
- touch_actions: [:post, 'session/:session_id/touch/perform'.freeze],
14
- multi_touch: [:post, 'session/:session_id/touch/multi/perform'.freeze],
27
+ touch_actions: [:post, 'session/:session_id/touch/perform'],
28
+ multi_touch: [:post, 'session/:session_id/touch/multi/perform'],
15
29
 
16
- set_immediate_value: [:post, 'session/:session_id/appium/element/:id/value'.freeze],
17
- replace_value: [:post, 'session/:session_id/appium/element/:id/replace_value'.freeze],
30
+ set_immediate_value: [:post, 'session/:session_id/appium/element/:id/value'],
31
+ replace_value: [:post, 'session/:session_id/appium/element/:id/replace_value'],
18
32
 
19
- launch_app: [:post, 'session/:session_id/appium/app/launch'.freeze],
20
- close_app: [:post, 'session/:session_id/appium/app/close'.freeze],
21
- reset: [:post, 'session/:session_id/appium/app/reset'.freeze],
22
- background_app: [:post, 'session/:session_id/appium/app/background'.freeze],
23
- app_strings: [:post, 'session/:session_id/appium/app/strings'.freeze],
33
+ launch_app: [:post, 'session/:session_id/appium/app/launch'],
34
+ close_app: [:post, 'session/:session_id/appium/app/close'],
35
+ reset: [:post, 'session/:session_id/appium/app/reset'],
36
+ background_app: [:post, 'session/:session_id/appium/app/background'],
37
+ app_strings: [:post, 'session/:session_id/appium/app/strings'],
24
38
 
25
- device_locked?: [:post, 'session/:session_id/appium/device/is_locked'.freeze],
26
- unlock: [:post, 'session/:session_id/appium/device/unlock'.freeze],
27
- lock: [:post, 'session/:session_id/appium/device/lock'.freeze],
28
- device_time: [:get, 'session/:session_id/appium/device/system_time'.freeze],
29
- install_app: [:post, 'session/:session_id/appium/device/install_app'.freeze],
30
- remove_app: [:post, 'session/:session_id/appium/device/remove_app'.freeze],
31
- app_installed?: [:post, 'session/:session_id/appium/device/app_installed'.freeze],
32
- activate_app: [:post, 'session/:session_id/appium/device/activate_app'.freeze],
33
- terminate_app: [:post, 'session/:session_id/appium/device/terminate_app'.freeze],
34
- app_state: [:post, 'session/:session_id/appium/device/app_state'.freeze],
35
- shake: [:post, 'session/:session_id/appium/device/shake'.freeze],
36
- hide_keyboard: [:post, 'session/:session_id/appium/device/hide_keyboard'.freeze],
37
- press_keycode: [:post, 'session/:session_id/appium/device/press_keycode'.freeze],
38
- long_press_keycode: [:post, 'session/:session_id/appium/device/long_press_keycode'.freeze],
39
+ device_locked?: [:post, 'session/:session_id/appium/device/is_locked'],
40
+ unlock: [:post, 'session/:session_id/appium/device/unlock'],
41
+ lock: [:post, 'session/:session_id/appium/device/lock'],
42
+ device_time: [:get, 'session/:session_id/appium/device/system_time'],
43
+ install_app: [:post, 'session/:session_id/appium/device/install_app'],
44
+ remove_app: [:post, 'session/:session_id/appium/device/remove_app'],
45
+ app_installed?: [:post, 'session/:session_id/appium/device/app_installed'],
46
+ activate_app: [:post, 'session/:session_id/appium/device/activate_app'],
47
+ terminate_app: [:post, 'session/:session_id/appium/device/terminate_app'],
48
+ app_state: [:post, 'session/:session_id/appium/device/app_state'],
49
+ shake: [:post, 'session/:session_id/appium/device/shake'],
50
+ hide_keyboard: [:post, 'session/:session_id/appium/device/hide_keyboard'],
51
+ press_keycode: [:post, 'session/:session_id/appium/device/press_keycode'],
52
+ long_press_keycode: [:post, 'session/:session_id/appium/device/long_press_keycode'],
39
53
  # keyevent is only for Selendroid
40
- keyevent: [:post, 'session/:session_id/appium/device/keyevent'.freeze],
41
- push_file: [:post, 'session/:session_id/appium/device/push_file'.freeze],
42
- pull_file: [:post, 'session/:session_id/appium/device/pull_file'.freeze],
43
- pull_folder: [:post, 'session/:session_id/appium/device/pull_folder'.freeze],
44
- get_clipboard: [:post, 'session/:session_id/appium/device/get_clipboard'.freeze],
45
- set_clipboard: [:post, 'session/:session_id/appium/device/set_clipboard'.freeze],
46
- finger_print: [:post, 'session/:session_id/appium/device/finger_print'.freeze],
47
- get_settings: [:get, 'session/:session_id/appium/settings'.freeze],
48
- update_settings: [:post, 'session/:session_id/appium/settings'.freeze],
49
- stop_recording_screen: [:post, 'session/:session_id/appium/stop_recording_screen'.freeze],
50
- start_recording_screen: [:post, 'session/:session_id/appium/start_recording_screen'.freeze],
51
- compare_images: [:post, 'session/:session_id/appium/compare_images'.freeze],
52
- is_keyboard_shown: [:get, 'session/:session_id/appium/device/is_keyboard_shown'.freeze]
54
+ keyevent: [:post, 'session/:session_id/appium/device/keyevent'],
55
+ push_file: [:post, 'session/:session_id/appium/device/push_file'],
56
+ pull_file: [:post, 'session/:session_id/appium/device/pull_file'],
57
+ pull_folder: [:post, 'session/:session_id/appium/device/pull_folder'],
58
+ get_clipboard: [:post, 'session/:session_id/appium/device/get_clipboard'],
59
+ set_clipboard: [:post, 'session/:session_id/appium/device/set_clipboard'],
60
+ finger_print: [:post, 'session/:session_id/appium/device/finger_print'],
61
+ get_settings: [:get, 'session/:session_id/appium/settings'],
62
+ update_settings: [:post, 'session/:session_id/appium/settings'],
63
+ stop_recording_screen: [:post, 'session/:session_id/appium/stop_recording_screen'],
64
+ start_recording_screen: [:post, 'session/:session_id/appium/start_recording_screen'],
65
+ compare_images: [:post, 'session/:session_id/appium/compare_images'],
66
+ is_keyboard_shown: [:get, 'session/:session_id/appium/device/is_keyboard_shown']
53
67
  }.freeze
54
68
 
55
69
  COMMAND_ANDROID = {
56
- open_notifications: [:post, 'session/:session_id/appium/device/open_notifications'.freeze],
57
- toggle_airplane_mode: [:post, 'session/:session_id/appium/device/toggle_airplane_mode'.freeze],
58
- start_activity: [:post, 'session/:session_id/appium/device/start_activity'.freeze],
59
- current_activity: [:get, 'session/:session_id/appium/device/current_activity'.freeze],
60
- current_package: [:get, 'session/:session_id/appium/device/current_package'.freeze],
61
- get_system_bars: [:get, 'session/:session_id/appium/device/system_bars'.freeze],
62
- get_display_density: [:get, 'session/:session_id/appium/device/display_density'.freeze],
63
- toggle_wifi: [:post, 'session/:session_id/appium/device/toggle_wifi'.freeze],
64
- toggle_data: [:post, 'session/:session_id/appium/device/toggle_data'.freeze],
65
- toggle_location_services: [:post, 'session/:session_id/appium/device/toggle_location_services'.freeze],
66
- end_coverage: [:post, 'session/:session_id/appium/app/end_test_coverage'.freeze],
67
- get_performance_data_types: [:post, 'session/:session_id/appium/performanceData/types'.freeze],
68
- get_performance_data: [:post, 'session/:session_id/appium/getPerformanceData'.freeze],
69
- get_network_connection: [:get, 'session/:session_id/network_connection'.freeze], # defined also in OSS
70
- set_network_connection: [:post, 'session/:session_id/network_connection'.freeze], # defined also in OSS
70
+ open_notifications: [:post, 'session/:session_id/appium/device/open_notifications'],
71
+ toggle_airplane_mode: [:post, 'session/:session_id/appium/device/toggle_airplane_mode'],
72
+ start_activity: [:post, 'session/:session_id/appium/device/start_activity'],
73
+ current_activity: [:get, 'session/:session_id/appium/device/current_activity'],
74
+ current_package: [:get, 'session/:session_id/appium/device/current_package'],
75
+ get_system_bars: [:get, 'session/:session_id/appium/device/system_bars'],
76
+ get_display_density: [:get, 'session/:session_id/appium/device/display_density'],
77
+ toggle_wifi: [:post, 'session/:session_id/appium/device/toggle_wifi'],
78
+ toggle_data: [:post, 'session/:session_id/appium/device/toggle_data'],
79
+ toggle_location_services: [:post, 'session/:session_id/appium/device/toggle_location_services'],
80
+ end_coverage: [:post, 'session/:session_id/appium/app/end_test_coverage'],
81
+ get_performance_data_types: [:post, 'session/:session_id/appium/performanceData/types'],
82
+ get_performance_data: [:post, 'session/:session_id/appium/getPerformanceData'],
83
+ get_network_connection: [:get, 'session/:session_id/network_connection'], # defined also in OSS
84
+ set_network_connection: [:post, 'session/:session_id/network_connection'], # defined also in OSS
71
85
 
72
86
  # only emulator
73
- send_sms: [:post, 'session/:session_id/appium/device/send_sms'.freeze],
74
- gsm_call: [:post, 'session/:session_id/appium/device/gsm_call'.freeze],
75
- gsm_signal: [:post, 'session/:session_id/appium/device/gsm_signal'.freeze],
76
- gsm_voice: [:post, 'session/:session_id/appium/device/gsm_voice'.freeze],
77
- set_network_speed: [:post, 'session/:session_id/appium/device/network_speed'.freeze],
78
- set_power_capacity: [:post, 'session/:session_id/appium/device/power_capacity'.freeze],
79
- set_power_ac: [:post, 'session/:session_id/appium/device/power_ac'.freeze]
87
+ send_sms: [:post, 'session/:session_id/appium/device/send_sms'],
88
+ gsm_call: [:post, 'session/:session_id/appium/device/gsm_call'],
89
+ gsm_signal: [:post, 'session/:session_id/appium/device/gsm_signal'],
90
+ gsm_voice: [:post, 'session/:session_id/appium/device/gsm_voice'],
91
+ set_network_speed: [:post, 'session/:session_id/appium/device/network_speed'],
92
+ set_power_capacity: [:post, 'session/:session_id/appium/device/power_capacity'],
93
+ set_power_ac: [:post, 'session/:session_id/appium/device/power_ac']
80
94
  }.freeze
81
95
 
82
96
  COMMAND_IOS = {
83
- touch_id: [:post, 'session/:session_id/appium/simulator/touch_id'.freeze],
84
- toggle_touch_id_enrollment: [:post, 'session/:session_id/appium/simulator/toggle_touch_id_enrollment'.freeze]
97
+ touch_id: [:post, 'session/:session_id/appium/simulator/touch_id'],
98
+ toggle_touch_id_enrollment: [:post, 'session/:session_id/appium/simulator/toggle_touch_id_enrollment']
85
99
  }.freeze
86
100
 
87
101
  COMMANDS = {}.merge(COMMAND).merge(COMMAND_ANDROID).merge(COMMAND_IOS).freeze
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  # rubocop:disable Layout/AlignHash
2
16
  module Appium
3
17
  module Core
@@ -6,7 +20,7 @@ module Appium
6
20
  COMMANDS = ::Appium::Core::Commands::COMMANDS.merge(::Appium::Core::Base::Commands::OSS).merge(
7
21
  {
8
22
  # W3C already has.
9
- take_element_screenshot: [:get, 'session/:session_id/element/:id/screenshot'.freeze]
23
+ take_element_screenshot: [:get, 'session/:session_id/element/:id/screenshot']
10
24
  }
11
25
  ).freeze
12
26
  end # module MJSONWP
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  # rubocop:disable Layout/AlignHash
2
16
  module Appium
3
17
  module Core
@@ -7,34 +21,34 @@ module Appium
7
21
  {
8
22
  # ::Appium::Core::Base::Commands::OSS has the following commands and Appium also use them.
9
23
  # Delegated to ::Appium::Core::Base::Commands::OSS commands
10
- status: [:get, 'status'.freeze], # https://w3c.github.io/webdriver/#dfn-status
11
- is_element_displayed: [:get, 'session/:session_id/element/:id/displayed'.freeze], # hint: https://w3c.github.io/webdriver/#element-displayedness
24
+ status: [:get, 'status'], # https://w3c.github.io/webdriver/#dfn-status
25
+ is_element_displayed: [:get, 'session/:session_id/element/:id/displayed'], # hint: https://w3c.github.io/webdriver/#element-displayedness
12
26
 
13
- get_timeouts: [:get, 'session/:session_id/timeouts'.freeze], # https://w3c.github.io/webdriver/#get-timeouts
27
+ get_timeouts: [:get, 'session/:session_id/timeouts'], # https://w3c.github.io/webdriver/#get-timeouts
14
28
 
15
29
  # Add OSS commands to W3C commands. We can remove them if we would like to remove them from W3C module.
16
30
  ### Session capability
17
- get_capabilities: [:get, 'session/:session_id'.freeze],
31
+ get_capabilities: [:get, 'session/:session_id'],
18
32
 
19
33
  ### rotatable
20
- get_screen_orientation: [:get, 'session/:session_id/orientation'.freeze],
21
- set_screen_orientation: [:post, 'session/:session_id/orientation'.freeze],
34
+ get_screen_orientation: [:get, 'session/:session_id/orientation'],
35
+ set_screen_orientation: [:post, 'session/:session_id/orientation'],
22
36
 
23
- get_location: [:get, 'session/:session_id/location'.freeze],
24
- set_location: [:post, 'session/:session_id/location'.freeze],
37
+ get_location: [:get, 'session/:session_id/location'],
38
+ set_location: [:post, 'session/:session_id/location'],
25
39
 
26
40
  ### For IME
27
- ime_get_available_engines: [:get, 'session/:session_id/ime/available_engines'.freeze],
28
- ime_get_active_engine: [:get, 'session/:session_id/ime/active_engine'.freeze],
29
- ime_is_activated: [:get, 'session/:session_id/ime/activated'.freeze],
30
- ime_deactivate: [:post, 'session/:session_id/ime/deactivate'.freeze],
31
- ime_activate_engine: [:post, 'session/:session_id/ime/activate'.freeze],
41
+ ime_get_available_engines: [:get, 'session/:session_id/ime/available_engines'],
42
+ ime_get_active_engine: [:get, 'session/:session_id/ime/active_engine'],
43
+ ime_is_activated: [:get, 'session/:session_id/ime/activated'],
44
+ ime_deactivate: [:post, 'session/:session_id/ime/deactivate'],
45
+ ime_activate_engine: [:post, 'session/:session_id/ime/activate'],
32
46
 
33
- send_keys_to_active_element: [:post, 'session/:session_id/keys'.freeze],
47
+ send_keys_to_active_element: [:post, 'session/:session_id/keys'],
34
48
 
35
49
  ### Logs
36
- get_available_log_types: [:get, 'session/:session_id/log/types'.freeze],
37
- get_log: [:post, 'session/:session_id/log'.freeze]
50
+ get_available_log_types: [:get, 'session/:session_id/log/types'],
51
+ get_log: [:post, 'session/:session_id/log']
38
52
  }
39
53
  ).freeze
40
54
  end # module W3C
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Core
3
17
  class Base