Function fillByXPath

  • Types the value into a form field by Xpath, replacing the existing text.

    Parameters

    • ctx: Context

      Context object.

    • selector: string

      Xpath selector.

    • value: string

      A text to type into field.

    • Optional options: FillOptions

    Returns Promise<void>

    Remarks

    Triggers an event for each character. If you want to keep the existing text, use the helper "typeByXPath".

    Example

    await fillByXPath(ctx, '//input[@id="message"]', 'Hello')
    

Generated using TypeDoc