Function clearAndType

  • Clears an input element and types the value into it.

    Parameters

    • ctx: Context

      Context object.

    • selector: string

      Selector for input element to clear and type.

    • value: string

      Value to type into input element.

    • Optional options: WaitForSelectorOptions

    Returns Promise<void>

    Deprecated

    • Use fill instead.

    Remarks

    Keep in mind that using the helper "clearAndType" 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 clearAndType(ctx, 'input[name="firstName"]', 'some value');
    

Generated using TypeDoc