Modifier and Type | Method and Description |
---|---|
boolean |
isAltPressed() |
boolean |
isCtrlPressed() |
boolean |
isShiftPressed() |
void |
performSingleKeyAction(com.gargoylesoftware.htmlunit.html.HtmlElement element,
java.lang.CharSequence modifierKey,
java.lang.String eventDescription)
Deprecated.
Visibility will soon be reduced.
|
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(com.gargoylesoftware.htmlunit.html.HtmlElement element,
java.lang.String currentValue,
InputKeysContainer keysToSend) |
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 sendKeys(com.gargoylesoftware.htmlunit.html.HtmlElement element, java.lang.String currentValue, InputKeysContainer keysToSend)
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 thrownpublic void performSingleKeyAction(com.gargoylesoftware.htmlunit.html.HtmlElement element, java.lang.CharSequence modifierKey, java.lang.String eventDescription)
public boolean isShiftPressed()
public boolean isCtrlPressed()
public boolean isAltPressed()