Function focus

  • Focuses on an element based on a CSS selector.

    Parameters

    • ctx: Context

      Context object.

    • selector: string

      Element selector.

    • Optional options: WaitForSelectorOptions

      Optional waiting parameters.

    Returns Promise<void>

    Example

    await focus(ctx, '#search-input');
    

    Example

    await focus(ctx, '#search-input', {timeout: 10000});
    

Generated using TypeDoc