We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f7efab commit 2fef71aCopy full SHA for 2fef71a
1 file changed
tests/test_app/tests/utils.py
@@ -117,16 +117,8 @@ def start_playwright_client(cls):
117
cls.browser = cls.playwright.chromium.launch(headless=bool(headless))
118
cls.page = cls.browser.new_page()
119
cls.page.set_default_timeout(10000)
120
- cls.page.on("console", cls.playwright_logging)
121
-
122
- @staticmethod
123
- def playwright_logging(msg):
124
- if msg.type == "error":
125
- _logger.error(msg.text)
126
- elif msg.type == "warning":
127
- _logger.warning(msg.text)
128
- elif msg.type == "info":
129
- _logger.info(msg.text)
+ cls.page.on("console", lambda msg: print(f"{msg.type.upper()}: {msg.text}"))
+ cls.page.on("pageerror", lambda err: print(f"ERROR: {err.name}: {err.message}"))
130
131
@classmethod
132
def shutdown_playwright_client(cls):
0 commit comments