Function clearInputByXPath

  • Clears the value in an input element by Xpath.

    Parameters

    • ctx: Context

      Context object.

    • selector: string

      Selector for input element to clear.

    Returns Promise<void>

    Deprecated

    • Use Use fillByXPath with an empty text instead.

    Remarks

    Keep in mind that using the helper "clearInputByXPath" 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 "fillByXPath" or "typeByXPath" instead.

    Example

    await clearInputByXPath(ctx, '//input[@id="firstName"]');
    

Generated using TypeDoc