Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playwright tracing doesn't create frame snapshots #101

Open
iSuslov opened this issue Nov 25, 2024 · 0 comments
Open

Playwright tracing doesn't create frame snapshots #101

iSuslov opened this issue Nov 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@iSuslov
Copy link
Contributor

iSuslov commented Nov 25, 2024

Describe the bug:

When using playwright trace feature, resulting traces have no frame snapshots.

Screenshots:

This is how it looks when trace doesn't have a frame snapshots:

Screenshot 2024-11-25 at 12 21 00 AM

This is how it should look:
Screenshot 2024-11-25 at 12 22 18 AM

To Reproduce:

from camoufox.sync_api import Camoufox

with Camoufox(
    geoip=True,
    headless=True
) as browser:
    context = browser.new_context()
    context.tracing.start(screenshots=True, snapshots=True)
    page = context.new_page()
    page.goto("https://google.com")
    page.wait_for_timeout(4000)
    context.tracing.stop(path="trace.zip")
    context.close()
    page.close()
    browser.close()

after running the code:

  • open the trace viewer: playwright show-trace
  • in the trace viewer open trace.zip that was produced by the code above

Version:

Pip package:    v0.4.3
Camoufox:       v132.0.2-beta.17 (Up to date!)

Additional info:

  • changing headless to True / False / Virtual doesn't solve the problem
  • no matter remote or local. Tested on Ubuntu 24.04 (remote, macos as a client) and MacOS 15.1 (local)
  • traces have screenshots and even have html files inside, but trace.trace (inside archive) doesn't have these entities:
{"type":"frame-snapshot","snapshot":{"callId":"call@8","snapshotName":"before@call@8","pageId":"page@b4ae9731aa790003d2fa59cc110a50ca","frameId":"frame@833b9e40f35a84590a34d52abd359c48","frameUrl":"about:blank","html":["HTML",{},["HEAD",{},["BASE",{"href":"about:blank"}]],["BODY"]],"viewport":{"width":1280,"height":720},"timestamp":1325.626,"wallTime":1732510550491,"collectionTime":2,"resourceOverrides":[],"isMainFrame":true}}

Difference in size:

"Bad" trace:
Screenshot 2024-11-25 at 12 32 18 AM

"Good" trace:
Screenshot 2024-11-25 at 12 33 42 AM

@iSuslov iSuslov added the bug Something isn't working label Nov 25, 2024
@iSuslov iSuslov changed the title Playwright tracing doesn't create page snapshots Playwright tracing doesn't create frame snapshots Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant