Class RemoteKeyboard

  • All Implemented Interfaces:
    Keyboard

    public class RemoteKeyboard
    extends java.lang.Object
    implements Keyboard
    An implementation of the keyboard for use with the remote webdriver.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RemoteKeyboard

        public RemoteKeyboard​(ExecuteMethod executor)
    • Method Detail

      • sendKeys

        public void sendKeys​(java.lang.CharSequence... keysToSend)
        Description copied from interface: Keyboard
        Sends keys to the keyboard representation in the browser. Special keys that are not text, represented as 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.
        Specified by:
        sendKeys in interface Keyboard
        Parameters:
        keysToSend - one or more sequences of characters or key representations to type on the keyboard
      • pressKey

        public void pressKey​(java.lang.CharSequence keyToPress)
        Description copied from interface: Keyboard
        Press a key on the keyboard that isn't text. Please see 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.
        Specified by:
        pressKey in interface Keyboard
        Parameters:
        keyToPress - the key to press, if a sequence only the first character will be read or an exception is thrown
      • releaseKey

        public void releaseKey​(java.lang.CharSequence keyToRelease)
        Description copied from interface: Keyboard
        Release a key on the keyboard that isn't text. Please see 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.
        Specified by:
        releaseKey in interface Keyboard
        Parameters:
        keyToRelease - the key to press, if a sequence only the first character will be read or an exception is thrown