Skip to content

test playwright with python in ci workflow#17

Draft
bowenliang123 wants to merge 7 commits into
langgenius:mainfrom
bowenliang123:test-playwright
Draft

test playwright with python in ci workflow#17
bowenliang123 wants to merge 7 commits into
langgenius:mainfrom
bowenliang123:test-playwright

Conversation

@bowenliang123
Copy link
Copy Markdown
Contributor

No description provided.

@bowenliang123 bowenliang123 changed the title test playwright within ci workflow test playwright with python in ci workflow Jan 26, 2026
@bowenliang123
Copy link
Copy Markdown
Contributor Author

The test passes on amd64 platform, while it failed on arm64.

It may be related to the differences on simulated arm64 on actual amd64 machine.
So I'm skipping the test on arm64 arch.

WARNING: The requested image's platform (linux/arm64) does not match the detected host platform (linux/amd64/v3) and no specific platform was requested
...
Running Playwright test script...
+ echo 'Running Playwright test script...'
+ python3 /test/bin/test_playwright.py
ERROR:root:Error during Playwright test: Browser.new_page: Target page, context or browser has been closed
Traceback (most recent call last):
  File "/test/bin/test_playwright.py", line 29, in test_playwright_html
    page = browser.new_page()
           ^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/playwright/sync_api/_generated.py", line 14272, in new_page
    self._sync(
  File "/opt/conda/lib/python3.12/site-packages/playwright/_impl/_sync_base.py", line 115, in _sync
    return task.result()
           ^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/playwright/_impl/_browser.py", line 230, in new_page
    return await self._connection.wrap_api_call(inner, title="Create page")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/playwright/_impl/_connection.py", line 559, in wrap_api_call
    raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None
playwright._impl._errors.TargetClosedError: Browser.new_page: Target page, context or browser has been closed
Testing Playwright with HTML file: /test/test.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant