Function waitForText

  • Waits for text to appear in element.

    Parameters

    • ctx: Context

      Context object.

    • label: string

      Text to wait for.

    • Optional element: string

      Element in which to wait for text.

    • Optional options: WaitForSelectorOptions

      Wait options.

    Returns Promise<null | ElementHandle<Node>>

    Example

    const xlabel = waitForText(ctx, '*', element);
    

    Example

    const xlabel = waitForText(ctx, '*', element, {hidden:true, timeout:200});