Function focusByXpath

  • Focuses on an element based on an XPath selector.

    Parameters

    • ctx: Context

      Context object.

    • selector: string

      Element XPath selector.

    • Optional options: WaitForSelectorOptions

      Optional waiting parameters.

    Returns Promise<void>

    Example

    await focusByXpath(ctx, '//input[@id="search-input"]');
    

    Example

    await focusByXpath(ctx, '//input[@id="search-input"]', {timeout: 10000});
    

Generated using TypeDoc