Open
Description
Version
1.53.0
Steps to reproduce
- Download this playwright trace: example-trace.zip
- Use playwright version
1.52
trace viewer to view the trace, e.g.playwright show-trace example-trace.zip
- Use playwright version
1.53.0
trace viewer to view the trace, e.g.playwright show-trace example-trace.zip
Expected behavior
Playwright trace viewer should show the collapsible group name exactly as given in the string passed to Tracing.group(name), even if it has unusual characters such as curly braces
Actual behavior
Collapsible group names are sometimes mangled if the have unusual characters such as curly braces
Additional context
The following script was used to generate the attached example trace:
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "playwright~=1.52.0",
# ]
# ///
from pathlib import Path
from playwright.sync_api import sync_playwright
def main():
with (
sync_playwright() as pw,
pw.chromium.launch(headless=False) as browser,
browser.new_context() as browser_context,
browser_context.new_page() as page,
):
browser_context.tracing.start(snapshots=True, screenshots=True, sources=True)
try:
browser_context.tracing.group("This group has curly braces here --> {{ hidden_stuff }} <--")
page.evaluate("console.log('hello world')")
browser_context.tracing.group_end()
finally:
browser_context.tracing.stop(path=Path("example-trace.zip"))
if __name__ == "__main__":
main()
NOTE: while the given trace was generated with playwright version 1.52.0
, the issue also occurs for traces generated with 1.53.0
Environment
- Operating System: macOS 15.3.2
- CPU: arm64
- Browser: All
- Python Version: Any
Metadata
Metadata
Assignees
Labels
No labels