| 构造器和说明 |
|---|
EventFiringKeyboard(WebDriver driver,
WebDriverEventListener dispatcher) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
pressKey(CharSequence keyToPress)
Press a key on the keyboard that isn't text.
|
void |
releaseKey(CharSequence keyToRelease)
Release a key on the keyboard that isn't text.
|
void |
sendKeys(CharSequence... keysToSend)
Sends keys to the keyboard representation in the browser.
|
public EventFiringKeyboard(WebDriver driver, WebDriverEventListener dispatcher)
public void sendKeys(CharSequence... keysToSend)
KeyboardKeys 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(CharSequence keyToPress)
KeyboardKeys 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(CharSequence keyToRelease)
KeyboardKeys 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 在接口中 KeyboardkeyToRelease - the key to press, if a sequence only the first character will be read or an
exception is thrown