I am having trouble with a Playwright feature that is failing to generate a tracelog. So, I would like to ask for your knowledge.
The source of the test script is as follows.
from playwright.async_api import async_playwright
import datetime
import pytest
@pytest.mark.asyncio
async def test_CheckVersions() -> None:
async with async_playwright() as playwright:
browser = await playwright.chromium.launch(channel='chrome',headless=True)
context = await browser.new_context()
await context.tracing.start(screenshots=True, snapshots=True, sources=True)
page = await context.new_page()
await page.goto("https://playwright.dev/python/")
await page.get_by_role("link", name="Community").click()
await page.get_by_role("link", name="Home page").click()
t_delta = datetime.timedelta(hours=9)
JST = datetime.timezone(t_delta, 'JST')
date = datetime.datetime.now(JST).strftime('%Y%m%d%H%M%S')
await context.tracing.stop(path = date + "_tracelog.zip")
await page.close()
await context.close()
await browser.close()
I am using Playwright for Python and the procedure is as follows.
Step 1: Prepare a self-hosted runner PC (Ubuntu 20.04 LTS) Step 2: Execute Actions from GitHub
- Install Python 3.8
- Install Playwright
- Install pytest
- Run the test script (pytest) Step 3. generate tracelog of the deliverables with show-trace → Generate fails
A tracelog generated by running pytest on the local PC, not from the runner PC, will succeed in show-trace.
The tracelog.zip that fails to show-trace had generated trace.stacks.
I would like to know what steps are necessary to make the show-trace of tracelog.zip succeed, whether the reason why the show-trace fails is because the trace.stacks are generated, and why the trace.stacks are being generated.
We would appreciate your assistance.
I deleted the trace.stacks in tracelog.zip and tried show-trace but could not generate. Run workflow from github actions and expect to successfully generate the tracelog.zip generated by runner pc.