@wpazderski/playwright-utils
    Preparing search index...

    Class PageUtils

    Utility class for Playwright page operations.

    Index

    Constructors

    Methods

    • Injects given script into the page via <script> tag. Adds .js extension if not present.

      Parameters

      • page: Page

        The Playwright page to inject the script into.

      • path: string

        The path to the script file to inject.

      Returns Promise<void>

    • Pipes web console messages to stdout. Handlers errors and warnings based on the provided options.

      Parameters

      • page: Page

        The Playwright page to listen for console messages.

      • OptionalpartialOptions: PipeWebConsoleToStdoutOptions

        Partial options for handling console messages.

      Returns void

      if an error message is received and onError is set to "throw".

      if a warning message is received and `onWarning