appium_lib_core 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +7 -2
- data/CHANGELOG.md +9 -0
- data/lib/appium_lib_core.rb +14 -0
- data/lib/appium_lib_core/android.rb +14 -0
- data/lib/appium_lib_core/android/device.rb +14 -0
- data/lib/appium_lib_core/android/device/auth_finger_print.rb +14 -0
- data/lib/appium_lib_core/android/device/clipboard.rb +14 -0
- data/lib/appium_lib_core/android/device/emulator.rb +14 -0
- data/lib/appium_lib_core/android/device/network.rb +14 -0
- data/lib/appium_lib_core/android/device/performance.rb +14 -0
- data/lib/appium_lib_core/android/device/screen.rb +14 -0
- data/lib/appium_lib_core/android/espresso/bridge.rb +14 -0
- data/lib/appium_lib_core/android/uiautomator1/bridge.rb +14 -0
- data/lib/appium_lib_core/android/uiautomator2/bridge.rb +14 -0
- data/lib/appium_lib_core/android/uiautomator2/device.rb +14 -0
- data/lib/appium_lib_core/android/uiautomator2/device/battery.rb +14 -0
- data/lib/appium_lib_core/android_espresso.rb +14 -0
- data/lib/appium_lib_core/android_uiautomator2.rb +14 -0
- data/lib/appium_lib_core/common.rb +14 -0
- data/lib/appium_lib_core/common/base.rb +14 -0
- data/lib/appium_lib_core/common/base/bridge.rb +15 -1
- data/lib/appium_lib_core/common/base/bridge/mjsonwp.rb +14 -0
- data/lib/appium_lib_core/common/base/bridge/w3c.rb +14 -0
- data/lib/appium_lib_core/common/base/capabilities.rb +14 -0
- data/lib/appium_lib_core/common/base/command.rb +14 -0
- data/lib/appium_lib_core/common/base/driver.rb +16 -2
- data/lib/appium_lib_core/common/base/http_default.rb +14 -0
- data/lib/appium_lib_core/common/base/platform.rb +14 -0
- data/lib/appium_lib_core/common/base/screenshot.rb +14 -0
- data/lib/appium_lib_core/common/base/search_context.rb +14 -0
- data/lib/appium_lib_core/common/command.rb +14 -0
- data/lib/appium_lib_core/common/command/common.rb +77 -63
- data/lib/appium_lib_core/common/command/mjsonwp.rb +15 -1
- data/lib/appium_lib_core/common/command/w3c.rb +30 -16
- data/lib/appium_lib_core/common/device/app_management.rb +14 -0
- data/lib/appium_lib_core/common/device/app_state.rb +14 -0
- data/lib/appium_lib_core/common/device/battery_status.rb +14 -0
- data/lib/appium_lib_core/common/device/clipboard_content_type.rb +14 -0
- data/lib/appium_lib_core/common/device/context.rb +14 -0
- data/lib/appium_lib_core/common/device/device.rb +14 -0
- data/lib/appium_lib_core/common/device/device_lock.rb +14 -0
- data/lib/appium_lib_core/common/device/file_management.rb +14 -0
- data/lib/appium_lib_core/common/device/image_comparison.rb +14 -0
- data/lib/appium_lib_core/common/device/ime_actions.rb +14 -0
- data/lib/appium_lib_core/common/device/keyboard.rb +14 -0
- data/lib/appium_lib_core/common/device/keyevent.rb +14 -0
- data/lib/appium_lib_core/common/device/screen_record.rb +14 -0
- data/lib/appium_lib_core/common/device/setting.rb +14 -0
- data/lib/appium_lib_core/common/device/touch_actions.rb +14 -0
- data/lib/appium_lib_core/common/device/value.rb +14 -0
- data/lib/appium_lib_core/common/error.rb +14 -0
- data/lib/appium_lib_core/common/log.rb +14 -0
- data/lib/appium_lib_core/common/logger.rb +14 -0
- data/lib/appium_lib_core/common/touch_action/multi_touch.rb +14 -0
- data/lib/appium_lib_core/common/touch_action/touch_actions.rb +14 -0
- data/lib/appium_lib_core/common/wait.rb +17 -3
- data/lib/appium_lib_core/common/wait/timer.rb +14 -0
- data/lib/appium_lib_core/common/ws/websocket.rb +14 -0
- data/lib/appium_lib_core/device.rb +14 -0
- data/lib/appium_lib_core/driver.rb +22 -2
- data/lib/appium_lib_core/ios.rb +14 -0
- data/lib/appium_lib_core/ios/device.rb +14 -0
- data/lib/appium_lib_core/ios/device/clipboard.rb +14 -0
- data/lib/appium_lib_core/ios/uiautomation/bridge.rb +14 -0
- data/lib/appium_lib_core/ios/uiautomation/device.rb +14 -0
- data/lib/appium_lib_core/ios/uiautomation/patch.rb +14 -0
- data/lib/appium_lib_core/ios/xcuitest/bridge.rb +14 -0
- data/lib/appium_lib_core/ios/xcuitest/device.rb +14 -0
- data/lib/appium_lib_core/ios/xcuitest/device/battery.rb +14 -0
- data/lib/appium_lib_core/ios/xcuitest/device/performance.rb +14 -0
- data/lib/appium_lib_core/ios/xcuitest/device/screen.rb +14 -0
- data/lib/appium_lib_core/ios_xcuitest.rb +14 -0
- data/lib/appium_lib_core/patch.rb +14 -0
- data/lib/appium_lib_core/version.rb +16 -2
- data/release_notes.md +6 -0
- data/script/commands.rb +15 -1
- 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'
|
10
|
-
set_context: [:post, 'session/:session_id/context'
|
11
|
-
current_context: [:get, 'session/:session_id/context'
|
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'
|
14
|
-
multi_touch: [:post, 'session/:session_id/touch/multi/perform'
|
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'
|
17
|
-
replace_value: [:post, 'session/:session_id/appium/element/:id/replace_value'
|
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'
|
20
|
-
close_app: [:post, 'session/:session_id/appium/app/close'
|
21
|
-
reset: [:post, 'session/:session_id/appium/app/reset'
|
22
|
-
background_app: [:post, 'session/:session_id/appium/app/background'
|
23
|
-
app_strings: [:post, 'session/:session_id/appium/app/strings'
|
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'
|
26
|
-
unlock: [:post, 'session/:session_id/appium/device/unlock'
|
27
|
-
lock: [:post, 'session/:session_id/appium/device/lock'
|
28
|
-
device_time: [:get, 'session/:session_id/appium/device/system_time'
|
29
|
-
install_app: [:post, 'session/:session_id/appium/device/install_app'
|
30
|
-
remove_app: [:post, 'session/:session_id/appium/device/remove_app'
|
31
|
-
app_installed?: [:post, 'session/:session_id/appium/device/app_installed'
|
32
|
-
activate_app: [:post, 'session/:session_id/appium/device/activate_app'
|
33
|
-
terminate_app: [:post, 'session/:session_id/appium/device/terminate_app'
|
34
|
-
app_state: [:post, 'session/:session_id/appium/device/app_state'
|
35
|
-
shake: [:post, 'session/:session_id/appium/device/shake'
|
36
|
-
hide_keyboard: [:post, 'session/:session_id/appium/device/hide_keyboard'
|
37
|
-
press_keycode: [:post, 'session/:session_id/appium/device/press_keycode'
|
38
|
-
long_press_keycode: [:post, 'session/:session_id/appium/device/long_press_keycode'
|
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'
|
41
|
-
push_file: [:post, 'session/:session_id/appium/device/push_file'
|
42
|
-
pull_file: [:post, 'session/:session_id/appium/device/pull_file'
|
43
|
-
pull_folder: [:post, 'session/:session_id/appium/device/pull_folder'
|
44
|
-
get_clipboard: [:post, 'session/:session_id/appium/device/get_clipboard'
|
45
|
-
set_clipboard: [:post, 'session/:session_id/appium/device/set_clipboard'
|
46
|
-
finger_print: [:post, 'session/:session_id/appium/device/finger_print'
|
47
|
-
get_settings: [:get, 'session/:session_id/appium/settings'
|
48
|
-
update_settings: [:post, 'session/:session_id/appium/settings'
|
49
|
-
stop_recording_screen: [:post, 'session/:session_id/appium/stop_recording_screen'
|
50
|
-
start_recording_screen: [:post, 'session/:session_id/appium/start_recording_screen'
|
51
|
-
compare_images: [:post, 'session/:session_id/appium/compare_images'
|
52
|
-
is_keyboard_shown: [:get, 'session/:session_id/appium/device/is_keyboard_shown'
|
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'
|
57
|
-
toggle_airplane_mode: [:post, 'session/:session_id/appium/device/toggle_airplane_mode'
|
58
|
-
start_activity: [:post, 'session/:session_id/appium/device/start_activity'
|
59
|
-
current_activity: [:get, 'session/:session_id/appium/device/current_activity'
|
60
|
-
current_package: [:get, 'session/:session_id/appium/device/current_package'
|
61
|
-
get_system_bars: [:get, 'session/:session_id/appium/device/system_bars'
|
62
|
-
get_display_density: [:get, 'session/:session_id/appium/device/display_density'
|
63
|
-
toggle_wifi: [:post, 'session/:session_id/appium/device/toggle_wifi'
|
64
|
-
toggle_data: [:post, 'session/:session_id/appium/device/toggle_data'
|
65
|
-
toggle_location_services: [:post, 'session/:session_id/appium/device/toggle_location_services'
|
66
|
-
end_coverage: [:post, 'session/:session_id/appium/app/end_test_coverage'
|
67
|
-
get_performance_data_types: [:post, 'session/:session_id/appium/performanceData/types'
|
68
|
-
get_performance_data: [:post, 'session/:session_id/appium/getPerformanceData'
|
69
|
-
get_network_connection: [:get, 'session/:session_id/network_connection'
|
70
|
-
set_network_connection: [:post, 'session/:session_id/network_connection'
|
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'
|
74
|
-
gsm_call: [:post, 'session/:session_id/appium/device/gsm_call'
|
75
|
-
gsm_signal: [:post, 'session/:session_id/appium/device/gsm_signal'
|
76
|
-
gsm_voice: [:post, 'session/:session_id/appium/device/gsm_voice'
|
77
|
-
set_network_speed: [:post, 'session/:session_id/appium/device/network_speed'
|
78
|
-
set_power_capacity: [:post, 'session/:session_id/appium/device/power_capacity'
|
79
|
-
set_power_ac: [:post, 'session/:session_id/appium/device/power_ac'
|
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'
|
84
|
-
toggle_touch_id_enrollment: [:post, 'session/:session_id/appium/simulator/toggle_touch_id_enrollment'
|
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'
|
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'
|
11
|
-
is_element_displayed: [:get, 'session/:session_id/element/:id/displayed'
|
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'
|
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'
|
31
|
+
get_capabilities: [:get, 'session/:session_id'],
|
18
32
|
|
19
33
|
### rotatable
|
20
|
-
get_screen_orientation: [:get, 'session/:session_id/orientation'
|
21
|
-
set_screen_orientation: [:post, 'session/:session_id/orientation'
|
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'
|
24
|
-
set_location: [:post, 'session/:session_id/location'
|
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'
|
28
|
-
ime_get_active_engine: [:get, 'session/:session_id/ime/active_engine'
|
29
|
-
ime_is_activated: [:get, 'session/:session_id/ime/activated'
|
30
|
-
ime_deactivate: [:post, 'session/:session_id/ime/deactivate'
|
31
|
-
ime_activate_engine: [:post, 'session/:session_id/ime/activate'
|
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'
|
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'
|
37
|
-
get_log: [:post, 'session/:session_id/log'
|
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
|