Class CdpKeys

java.lang.Object
io.karatelabs.driver.cdp.CdpKeys
All Implemented Interfaces:
Keys

public class CdpKeys extends Object implements Keys
CDP-based implementation of keyboard actions. Uses CDP Input.dispatchKeyEvent for low-level keyboard control.
  • Constructor Details

  • Method Details

    • type

      public Keys type(String text)
      Description copied from interface: Keys
      Type a sequence of characters.
      Specified by:
      type in interface Keys
      Parameters:
      text - the text to type
      Returns:
      this for chaining
    • press

      public Keys press(String key)
      Description copied from interface: Keys
      Press and release a key.
      Specified by:
      press in interface Keys
      Parameters:
      key - the key to press (can be a special key constant or single character)
      Returns:
      this for chaining
    • down

      public Keys down(String key)
      Description copied from interface: Keys
      Hold down a modifier key.
      Specified by:
      down in interface Keys
      Parameters:
      key - the modifier key (SHIFT, CONTROL, ALT, META)
      Returns:
      this for chaining
    • up

      public Keys up(String key)
      Description copied from interface: Keys
      Release a modifier key.
      Specified by:
      up in interface Keys
      Parameters:
      key - the modifier key (SHIFT, CONTROL, ALT, META)
      Returns:
      this for chaining
    • combo

      public Keys combo(String[] modifierKeys, String key)
      Description copied from interface: Keys
      Press a key combination (e.g., Ctrl+A, Shift+Tab).
      Specified by:
      combo in interface Keys
      Parameters:
      modifierKeys - the modifier keys to hold
      key - the key to press
      Returns:
      this for chaining
    • ctrl

      public Keys ctrl(String key)
      Description copied from interface: Keys
      Press Ctrl+key combination.
      Specified by:
      ctrl in interface Keys
    • alt

      public Keys alt(String key)
      Description copied from interface: Keys
      Press Alt+key combination.
      Specified by:
      alt in interface Keys
    • shift

      public Keys shift(String key)
      Description copied from interface: Keys
      Press Shift+key combination.
      Specified by:
      shift in interface Keys
    • meta

      public Keys meta(String key)
      Description copied from interface: Keys
      Press Meta/Command+key combination.
      Specified by:
      meta in interface Keys