Skip to content

Commit

Permalink
debug: log all browser js messages
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Jun 20, 2023
1 parent 4418f3d commit 5980832
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions solara/test/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ def context_session(
@pytest.fixture(scope="session")
def page_session(context_session: "playwright.sync_api.BrowserContext"):
page = context_session.new_page()

def log(msg):
print("PAGE LOG:", msg.text) # noqa
logger.debug("PAGE LOG: %s", msg.text)

page.on("console", log)
yield page
page.close()

Expand Down

0 comments on commit 5980832

Please sign in to comment.