Skip to content

[Feature]: Add extra logging for the PW  #2369

@Yutsis1

Description

@Yutsis1

🚀 Feature Request

Hello! Is that possible to add extra logging for PW?

Example

For example modify this to something like this

try:
    result = next(iter(done)).result()
except Exception as e:
    raise Error(f"An error '{e.name}' rised during method '{method}' \n" \
                        f"With params: {params} \n" \
                       f" Error message: {e.message}")

If do this error message will look like this
b74808c2-ca48-47b6-8db5-a4852f47b2f3

Motivation

In many cases, you get an error like playwright._impl._errors.TimeoutError: Timeout 30000ms exceeded. which is not enough informative if you show only error message. Unfortunately, a trace log might be long, but in params usually contains a lot of useful info such as selector if it UI, headers for API call etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions