Interface Keyboard
-
@Deprecated public interface Keyboard
Deprecated.UseActions
andKeyInput
instead.Interface representing basic, low-level keyboard operations. It offers a set of low-level "do as I say" commands to allow precise emulation of user input.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
pressKey(java.lang.CharSequence keyToPress)
Deprecated.Press a key on the keyboard that isn't text.void
releaseKey(java.lang.CharSequence keyToRelease)
Deprecated.Release a key on the keyboard that isn't text.void
sendKeys(java.lang.CharSequence... keysToSend)
Deprecated.Sends keys to the keyboard representation in the browser.
-
-
-
Method Detail
-
sendKeys
void sendKeys(java.lang.CharSequence... keysToSend)
Deprecated.Sends keys to the keyboard representation in the browser. Special keys that are not text, represented asKeys
are recognized both as part of sequences of characters, or individually. Modifier keys are preserved throughout the lifetime of the send keys operation, and are released upon this method returning.- Parameters:
keysToSend
- one or more sequences of characters or key representations to type on the keyboard- Throws:
java.lang.IllegalArgumentException
- if keysToSend is null
-
pressKey
void pressKey(java.lang.CharSequence keyToPress)
Deprecated.Press a key on the keyboard that isn't text. Please seeKeys
for an exhaustive list of recognized pressable keys. IfkeyToPress
is a sequence of characters, different driver implementations may choose to throw an exception or to read only the first character in the sequence.- Parameters:
keyToPress
- the key to press, if a sequence only the first character will be read or an exception is thrown
-
releaseKey
void releaseKey(java.lang.CharSequence keyToRelease)
Deprecated.Release a key on the keyboard that isn't text. Please seeKeys
for an exhaustive list of recognized pressable keys. IfkeyToRelease
is a sequence of characters, different driver implementations may choose to throw an exception or to read only the first character in the sequence.- Parameters:
keyToRelease
- the key to press, if a sequence only the first character will be read or an exception is thrown
-
-