Function clearInput

  • Clears the value in an input element.

    Parameters

    • ctx: Context

      Context object.

    • selector: string

      Selector for input element to clear.

    • Optional options: WaitForSelectorOptions

    Returns Promise<void>

    Deprecated

    • Use Use fill with an empty text instead.

    Remarks

    Keep in mind that using the helper "Clear" on form fields will not trigger change events, and the website will not see the change. In this case, one almost always want to use "fill" or "type" instead.

    Example

    await clearInput(ctx, 'input[id="E-mail"]');
    

Generated using TypeDoc