Type specified input into an element specified by a locator.

Deprecated

In most cases, you should use Fill.in instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use Press.characters.

Hierarchy

  • Action
    • Type

Properties

Methods - Factory

Methods - Other

Methods - called internally

Properties

abilityAlias?: string
callStack?: CallStackInfo[]

Methods - Factory

  • Finds the specified locator and will it with the specified input string.

    Parameters

    • locator: Locator

      the locator.

    • input: string

      the input.

    • Optional options: TypeActionOptions

      (optional) options for the type action.

    Returns Type

    new Type instance

    Example

    simple call with just locator

    Type.in(
    page.locator('myLocator'),
    'myInput'
    );

    with options

    Type.in(
    page.locator('myLocator'),
    'myInput',
    { timeout: 3000 }
    );

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

  • find the specified locator and fill it.

    Parameters

    • actor: Actor

      the actor which is used

    Returns Promise<void>

    Focuses the element, and then sends a keydown, keypress/input, and keyup event for each character in the text.

Generated using TypeDoc