Modifier and Type | Field and Description |
---|---|
protected ExecuteMethod |
executor |
Constructor and Description |
---|
RemoteKeyboard(ExecuteMethod executor) |
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.
|
protected final ExecuteMethod executor
public RemoteKeyboard(ExecuteMethod executor)
public void sendKeys(java.lang.CharSequence... keysToSend)
Keyboard
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.public void pressKey(java.lang.CharSequence keyToPress)
Keyboard
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.public void releaseKey(java.lang.CharSequence keyToRelease)
Keyboard
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.releaseKey
in interface Keyboard
keyToRelease
- the key to press, if a sequence only the first character will be read or an
exception is thrown