Press the specified key on the keyboard.

Hierarchy

  • Action
    • Press

Properties

Methods - Factory

Methods - Other

Methods - called internally

Properties

abilityAlias?: string
callStack?: CallStackInfo[]

Methods - Factory

  • Press the specified keys sequentially for each string character To press a special key, like Control or ArrowDown, use key.

    Parameters

    • locator: Locator

      the locator.

    • input: string

      the keys of characters to press.

    • Optional options: PressActionOptions

      (optional) options for the press action.

    Returns Press

    new Press instance

    Example

    keys of characters

    Press.characters('abcdefghijklmnopqrstuvwxyz');
    
  • Press a key on the keyboard. (or multiple keys with +, e.g. Shift+A)

    Parameters

    • keys: string

      the key(s) to press.

    • Optional options: PressActionOptions

      (optional) options for the press action.

    Returns Press

    new Press instance

    Example

    single key

    Press.key('A');
    

    multiple keys

    Press.key('Control+A')
    

Methods - Other

  • Parameters

    • entry: CallStackInfo

    Returns void

  • Parameters

    • calledWith: CallStackCalledWith

    Returns void

  • Set the alias which is used for an underlying ability

    Parameters

    • alias: undefined | string

      with which an ability was initialized

    Returns this

    current action

Methods - called internally

  • Press the specified key.

    Parameters

    • actor: Actor

      Actor performing this action

    Returns Promise<void>

    Returns when the key can specify the intended value or a single character to generate the text for.

Generated using TypeDoc