diff --git a/playwright/_impl/_local_utils.py b/playwright/_impl/_local_utils.py index 6b97386c4..af0683ed2 100644 --- a/playwright/_impl/_local_utils.py +++ b/playwright/_impl/_local_utils.py @@ -63,7 +63,7 @@ async def tracing_started(self, tracesDir: Optional[str], traceName: str) -> str return await self._channel.send("tracingStarted", params) async def trace_discarded(self, stacks_id: str) -> None: - return await self._channel.send("traceDiscarded", {"stacks_id": stacks_id}) + return await self._channel.send("traceDiscarded", {"stacksId": stacks_id}) def add_stack_to_tracing_no_reply(self, id: int, frames: List[StackFrame]) -> None: self._channel.send_no_reply( diff --git a/tests/async/test_tracing.py b/tests/async/test_tracing.py index fe436c654..13f510591 100644 --- a/tests/async/test_tracing.py +++ b/tests/async/test_tracing.py @@ -33,6 +33,13 @@ async def test_browser_context_output_trace( assert Path(tmp_path / "trace.zip").exists() +async def test_start_stop(browser: Browser): + context = await browser.new_context() + await context.tracing.start() + await context.tracing.stop() + await context.close() + + async def test_browser_context_should_not_throw_when_stopping_without_start_but_not_exporting( context: BrowserContext, server: Server, tmp_path: Path ):