Skip to content

Commit 9ed1202

Browse files
authored
chore: remove selendroid stuff (#349)
1 parent fc37c9f commit 9ed1202

File tree

5 files changed

+3
-31
lines changed

5 files changed

+3
-31
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ Read `release_notes.md` for commit level details.
2828
- Add `driver#wait`, `driver#wait_until`, `driver#wait_true`, `driver#wait_until_true` syntaxes
2929
- Can give `driver` instance as its block variable
3030

31+
### Deprecations
32+
- Removed Selendroid related methods
33+
3134
## [4.7.1] - 2021-09-26
3235

3336
### Enhancements

lib/appium_lib_core/common/base/driver.rb

-13
Original file line numberDiff line numberDiff line change
@@ -512,19 +512,6 @@ def pull_folder(path)
512512
@bridge.pull_folder(path)
513513
end
514514

515-
# Send keyevent on the device.(Only for Selendroid)
516-
# http://developer.android.com/reference/android/view/KeyEvent.html
517-
# @param [integer] key The key to press.
518-
# @param [String] metastate The state the metakeys should be in when pressing the key.
519-
#
520-
# @example
521-
#
522-
# @driver.keyevent 82
523-
#
524-
def keyevent(key, metastate = nil)
525-
@bridge.keyevent(key, metastate)
526-
end
527-
528515
# Press keycode on the device.
529516
# http://developer.android.com/reference/android/view/KeyEvent.html
530517
# @param [Integer] key The key to press. The values which have +KEYCODE_+ prefix in http://developer.android.com/reference/android/view/KeyEvent.html

lib/appium_lib_core/common/command.rb

-2
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,6 @@ module Commands
213213
hide_keyboard: [:post, 'session/:session_id/appium/device/hide_keyboard'],
214214
press_keycode: [:post, 'session/:session_id/appium/device/press_keycode'],
215215
long_press_keycode: [:post, 'session/:session_id/appium/device/long_press_keycode'],
216-
# keyevent is only for Selendroid
217-
keyevent: [:post, 'session/:session_id/appium/device/keyevent'],
218216
push_file: [:post, 'session/:session_id/appium/device/push_file'],
219217
pull_file: [:post, 'session/:session_id/appium/device/pull_file'],
220218
pull_folder: [:post, 'session/:session_id/appium/device/pull_folder'],

test/functional/android/android/device_test.rb

-6
Original file line numberDiff line numberDiff line change
@@ -271,12 +271,6 @@ def test_get_display_density
271271
assert @driver.get_display_density.positive?
272272
end
273273

274-
def test_keyevent
275-
skip('Because only for Selendroid')
276-
# http://developer.android.com/reference/android/view/KeyEvent.html
277-
assert @driver.keyevent(176)
278-
end
279-
280274
def test_press_keycode
281275
# http://developer.android.com/reference/android/view/KeyEvent.html
282276
result = @driver.press_keycode(176) # it does not raise error

test/unit/android/device/w3c/keyboard_test.rb

-10
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,6 @@ def test_hide_keyboard
4747
assert_requested(:post, "#{SESSION}/appium/device/hide_keyboard", times: 1)
4848
end
4949

50-
def test_keyevent
51-
# only for Selendroid
52-
stub_request(:post, "#{SESSION}/appium/device/keyevent")
53-
.to_return(headers: HEADER, status: 200, body: { value: '' }.to_json)
54-
55-
@driver.keyevent 86
56-
57-
assert_requested(:post, "#{SESSION}/appium/device/keyevent", times: 1)
58-
end
59-
6050
# keypress
6151
def test_press_keycode
6252
stub_request(:post, "#{SESSION}/appium/device/press_keycode")

0 commit comments

Comments
 (0)