File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -117,16 +117,8 @@ def start_playwright_client(cls):
117117 cls .browser = cls .playwright .chromium .launch (headless = bool (headless ))
118118 cls .page = cls .browser .new_page ()
119119 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 )
120+ cls .page .on ("console" , lambda msg : print (f"{ msg .type .upper ()} : { msg .text } " ))
121+ cls .page .on ("pageerror" , lambda err : print (f"ERROR: { err .name } : { err .message } " ))
130122
131123 @classmethod
132124 def shutdown_playwright_client (cls ):
You can’t perform that action at this time.
0 commit comments