Function waitForText

  • Waits for text to appear in element.

    Parameters

    • ctx: Context

      Context object.

    • label: string

      Text to wait for.

    • Optionalelement: string

      Element in which to wait for text.

    • Optionaloptions: WaitForSelectorOptions

      Wait options.

    Returns Promise<null | ElementHandle<Node>>

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