Function waitForXPath

  • Waits for an XPath selector to become visible.

    Parameters

    • ctx: Context

      Context object.

    • selector: string

      the selector to wait for.

    • Optional options: WaitForSelectorOptions

      Wait for selector options.

    Returns Promise<null | ElementHandle<Node>>

    Example

     await waitForXPath(ctx, '//button[@id="save-button"]');