-
- All Implemented Interfaces:
-
com.kaspersky.kaspresso.device.keyboard.Keyboard
public final class KeyboardImpl implements Keyboard
The implementation of the Keyboard interface.
-
-
Constructor Summary
Constructors Constructor Description KeyboardImpl(AdbServer adbServer)
-
Method Summary
-
-
Constructor Detail
-
KeyboardImpl
KeyboardImpl(AdbServer adbServer)
-
-
Method Detail
-
typeText
Unit typeText(String text)
Types text char by char in the focused text field. Use it only when Espresso or UiAutomator are not appropriate (e.g. when you are on the lock screen).
Consider to use ViewActions.typeText. Also, consider to use UiObject.setText.
Required Permissions: INTERNET
-
sendEvent
Unit sendEvent(Integer keyEvent)
Sends a key event. Use constants from KeyEvent to get the code.
Consider to use ViewActions.pressKey. Also, consider to use UiDevice.pressKeyCode, or more semantic methods like UiDevice.pressMenu, UiDevice.pressDPadLeft and so on.
Required Permissions: INTERNET
- Parameters:
keyEvent- the code from a KeyEvent constant to send on device.
-
-
-
-