Skip to content

[BUG] Frame is emitted on Page events domcontentloaded/load #1399

New issue

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

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

Already on GitHub? # to your account

Closed
YusukeIwaki opened this issue Jul 3, 2022 · 2 comments · Fixed by #1400
Closed

[BUG] Frame is emitted on Page events domcontentloaded/load #1399

YusukeIwaki opened this issue Jul 3, 2022 · 2 comments · Fixed by #1400
Assignees

Comments

@YusukeIwaki
Copy link

Context:

  • Playwright Version: 1.23
  • Operating System: macOS
  • Python version: 3.9
  • Browser: Chromium

Code Snippet

from playwright.sync_api import sync_playwright, Page

with sync_playwright() as playwright:
    with playwright.chromium.launch(channel='chrome') as browser:
        page = browser.new_page()
        with page.expect_event('domcontentloaded') as event:
            page.goto('https://github.com/YusukeIwaki')
        print(event.value)

Describe the bug

The code above prints Frame in 1.23, which was Page in 1.22.
The JS version of Playwright still prints Page with the similar code, so I think this is an unexpected change.
The change would be made here: https://github.com/microsoft/playwright-python/pull/1374/files#diff-532b443f553121e300cafcb5964712250d091576e944af3b880ba143e1413c28R103

@rwoll rwoll self-assigned this Jul 3, 2022
@rwoll rwoll added the v1.23 label Jul 3, 2022
@rwoll
Copy link
Member

rwoll commented Jul 3, 2022

Oops! Thanks for pointing this out. Let me update and add test coverage here.

rwoll added a commit to rwoll/playwright-python that referenced this issue Jul 3, 2022
@rwoll
Copy link
Member

rwoll commented Jul 3, 2022

Once #1400, we'll put it into a patch release of the Python 1.23 version. Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants