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

    Interface PipeWebConsoleToStdoutOptions

    Options for the PageUtils.pipeWebConsoleToStdout method.

    interface PipeWebConsoleToStdoutOptions {
        allowedMethods?: string[];
        includeKnownMessages?: boolean;
        onError?:
            | "continue"
            | "throw"
            | ((msg: ConsoleMessage) => void | Promise<void>);
        onWarning?:
            | "continue"
            | "throw"
            | ((msg: ConsoleMessage) => void | Promise<void>);
    }
    Index

    Properties

    allowedMethods?: string[]

    Allowed console methods to process. Defaults to ["log", "debug", "info", "warn", "error", "dir"].

    includeKnownMessages?: boolean

    Whether to include unimportant known messages. Defaults to false (unimportant known messages are ignored).

    onError?: "continue" | "throw" | ((msg: ConsoleMessage) => void | Promise<void>)

    Action to perform when an error message is received.

    • "continue" - continue processing messages.
    • "throw" - throw an instance of WebConsoleError.
    • (msg: ConsoleMessage) => void | Promise - call the function with the message. Defaults to "throw".
    onWarning?:
        | "continue"
        | "throw"
        | ((msg: ConsoleMessage) => void | Promise<void>)

    Action to perform when a warning message is received.

    • "continue" - continue processing messages.
    • "throw" - throw an instance of WebConsoleWarning.
    • (msg: ConsoleMessage) => void | Promise - call the function with the message. Defaults to "continue".