Skip to content

console.log() in JavaScript blocks should go to stdout #101

@simonw

Description

@simonw

I was trying to debug a javascript: block in a shots.yml file and realized that console.log() would be useful.

https://playwright.dev/python/docs/api/class-consolemessage#console-message-args says it's as easy as doing this:

# Listen for all console logs
page.on("console", lambda msg: print(msg.text))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions