public interface Keyboard
Modifier and Type | Method and Description |
---|---|
void |
pressKey(java.lang.CharSequence keyToPress)
Press a key on the keyboard that isn't text.
|
void |
releaseKey(java.lang.CharSequence keyToRelease)
Release a key on the keyboard that isn't text.
|
void |
sendKeys(java.lang.CharSequence... keysToSend)
Sends keys to the keyboard representation in the browser.
|
void sendKeys(java.lang.CharSequence... keysToSend)
Keys
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.keysToSend
- one or more sequences of characters or key representations to type on the
keyboardjava.lang.IllegalArgumentException
- if keysToSend is nullvoid pressKey(java.lang.CharSequence keyToPress)
Keys
for
an exhaustive list of recognized pressable keys.
If keyToPress
is a sequence of characters, different driver implementations may
choose to throw an exception or to read only the first character in the sequence.keyToPress
- the key to press, if a sequence only the first character will be read or an
exception is thrownvoid releaseKey(java.lang.CharSequence keyToRelease)
Keys
for
an exhaustive list of recognized pressable keys.
If keyToRelease
is a sequence of characters, different driver implementations may
choose to throw an exception or to read only the first character in the sequence.keyToRelease
- the key to press, if a sequence only the first character will be read or an
exception is thrown