Package org.openqa.selenium.interactions
Interface Keyboard
-
@Deprecated public interface KeyboardInterface 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 voidpressKey(java.lang.CharSequence keyToPress)Deprecated.Press a key on the keyboard that isn't text.voidreleaseKey(java.lang.CharSequence keyToRelease)Deprecated.Release a key on the keyboard that isn't text.voidsendKeys(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 asKeysare 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 seeKeysfor an exhaustive list of recognized pressable keys. IfkeyToPressis 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 seeKeysfor an exhaustive list of recognized pressable keys. IfkeyToReleaseis 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
-
-