Function type

  • Types into a form field, after the existing text.

    Parameters

    • ctx: Context

      Context object.

    • selector: string

      Css selector.

    • value: string

      A value to type into field.

    • options: TypeOptions & WaitForSelectorOptions = {}

    Returns Promise<void>

    Remarks

    Triggers an event for each character. If you want to clear the field first, use the helper "fill".

    Example

    await type(ctx, 'input', 'Hello');
    

    Example

    await type(ctx, 'input', 'Hello', {
    delay: 500,
    clear: true,
    blur: true,
    });

Generated using TypeDoc