mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 16:02:26 +00:00
chore(ai): add automated PR review report
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
c3f96c8819
commit
cfbbf78941
30 files changed
+616
-1765
No files matched your search
@@ -1,31 +1,33 @@
|
||||
from playwright.sync_api import sync_playwright
|
||||
import sys
|
||||
import time
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
def run():
|
||||
with sync_playwright() as p:
|
||||
# Launch browser (headless by default)
|
||||
browser = p.chromium.launch()
|
||||
page = browser.new_page()
|
||||
|
||||
print("--- Debugging Frontend ---")
|
||||
|
||||
# Listen for console messages
|
||||
# Capture console messages
|
||||
page.on("console", lambda msg: print(f"console:{msg.type}: {msg.text}"))
|
||||
|
||||
# Listen for uncaught exceptions
|
||||
# Capture uncaught exceptions
|
||||
page.on("pageerror", lambda exc: print(f"pageerror: {exc}"))
|
||||
|
||||
# Listen for failed requests
|
||||
page.on("requestfailed", lambda req: print(f"requestfailed: {req.url} {req.failure}"))
|
||||
# Capture failed requests
|
||||
page.on("requestfailed", lambda request: print(f"requestfailed: {request.url} {request.failure}"))
|
||||
|
||||
try:
|
||||
print("Navigating to http://localhost:8000...")
|
||||
page.goto("http://localhost:8000")
|
||||
# Wait for network idle or a specific time to allow scripts to execute
|
||||
page.wait_for_timeout(5000)
|
||||
except Exception as e:
|
||||
print(f"Navigation failed: {e}")
|
||||
|
||||
browser.close()
|
||||
# Wait for some time to catch initialization errors
|
||||
time.sleep(5)
|
||||
|
||||
except Exception as e:
|
||||
print(f"Script error: {e}")
|
||||
finally:
|
||||
browser.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
Reference in new issue
Block a user