Skip to content

Commit ef619d3

Browse files
committed
refactor: rename OnFrame to ScreencastFrame
1 parent 4a0d3f4 commit ef619d3

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

playwright/_impl/_api_structures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,5 +328,5 @@ class PausedDetails(TypedDict):
328328
title: str
329329

330330

331-
class OnFrame(TypedDict):
331+
class ScreencastFrame(TypedDict):
332332
data: bytes

playwright/_impl/_screencast.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
Union,
2525
)
2626

27-
from playwright._impl._api_structures import OnFrame
27+
from playwright._impl._api_structures import ScreencastFrame
2828
from playwright._impl._artifact import Artifact
2929
from playwright._impl._connection import from_channel
3030
from playwright._impl._disposable import DisposableStub
@@ -38,7 +38,7 @@ def __init__(self, page: "Page") -> None:
3838
self._page = page
3939
self._started = False
4040
self._save_path: Optional[Union[str, Path]] = None
41-
self._on_frame: Optional[Callable[[OnFrame], Awaitable[Any]]] = None
41+
self._on_frame: Optional[Callable[[ScreencastFrame], Awaitable[Any]]] = None
4242
self._artifact: Optional[Artifact] = None
4343
self._page._channel.on("screencastFrame", self._handle_frame)
4444

@@ -50,7 +50,7 @@ async def start(
5050
self,
5151
path: Union[str, Path] = None,
5252
quality: int = None,
53-
onFrame: Callable[[OnFrame], Awaitable[Any]] = None,
53+
onFrame: Callable[[ScreencastFrame], Awaitable[Any]] = None,
5454
) -> DisposableStub:
5555
if self._started:
5656
raise Exception("Screencast is already started")

playwright/async_api/_generated.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
Geolocation,
2828
HttpCredentials,
2929
NameValue,
30-
OnFrame,
3130
PausedDetails,
3231
PausedDetailsLocation,
3332
PdfMargins,
@@ -36,6 +35,7 @@
3635
RemoteAddr,
3736
RequestSizes,
3837
ResourceTiming,
38+
ScreencastFrame,
3939
SecurityDetails,
4040
SetCookieParam,
4141
SourceLocation,
@@ -21599,7 +21599,7 @@ async def start(
2159921599
path: typing.Optional[typing.Union[pathlib.Path, str]] = None,
2160021600
quality: typing.Optional[int] = None,
2160121601
on_frame: typing.Optional[
21602-
typing.Callable[[OnFrame], typing.Awaitable[typing.Any]]
21602+
typing.Callable[[ScreencastFrame], typing.Awaitable[typing.Any]]
2160321603
] = None,
2160421604
) -> "AsyncContextManager":
2160521605
"""Screencast.start

playwright/sync_api/_generated.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
Geolocation,
2828
HttpCredentials,
2929
NameValue,
30-
OnFrame,
3130
PausedDetails,
3231
PausedDetailsLocation,
3332
PdfMargins,
@@ -36,6 +35,7 @@
3635
RemoteAddr,
3736
RequestSizes,
3837
ResourceTiming,
38+
ScreencastFrame,
3939
SecurityDetails,
4040
SetCookieParam,
4141
SourceLocation,
@@ -21689,7 +21689,7 @@ def start(
2168921689
path: typing.Optional[typing.Union[pathlib.Path, str]] = None,
2169021690
quality: typing.Optional[int] = None,
2169121691
on_frame: typing.Optional[
21692-
typing.Callable[[OnFrame], typing.Awaitable[typing.Any]]
21692+
typing.Callable[[ScreencastFrame], typing.Awaitable[typing.Any]]
2169321693
] = None,
2169421694
) -> "SyncContextManager":
2169521695
"""Screencast.start

scripts/generate_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def return_value(value: Any) -> List[str]:
227227
from typing import Literal
228228
229229
230-
from playwright._impl._api_structures import Cookie, SetCookieParam, FloatRect, FilePayload, Geolocation, HttpCredentials, PdfMargins, Position, ProxySettings, ResourceTiming, SourceLocation, StorageState, ClientCertificate, ViewportSize, RemoteAddr, SecurityDetails, RequestSizes, NameValue, TracingGroupLocation, PausedDetails, PausedDetailsLocation, OnFrame, Bind
230+
from playwright._impl._api_structures import Cookie, SetCookieParam, FloatRect, FilePayload, Geolocation, HttpCredentials, PdfMargins, Position, ProxySettings, ResourceTiming, SourceLocation, StorageState, ClientCertificate, ViewportSize, RemoteAddr, SecurityDetails, RequestSizes, NameValue, TracingGroupLocation, PausedDetails, PausedDetailsLocation, ScreencastFrame, Bind
231231
from playwright._impl._browser import Browser as BrowserImpl
232232
from playwright._impl._browser_context import BrowserContext as BrowserContextImpl
233233
from playwright._impl._browser_type import BrowserType as BrowserTypeImpl

0 commit comments

Comments
 (0)