|
64 | 64 | from playwright.page import Worker as WorkerImpl
|
65 | 65 | from playwright.playwright import Playwright as PlaywrightImpl
|
66 | 66 | from playwright.selectors import Selectors as SelectorsImpl
|
| 67 | +from playwright.video import Video as VideoImpl |
67 | 68 |
|
68 | 69 | NoneType = type(None)
|
69 | 70 |
|
@@ -3127,6 +3128,25 @@ async def saveAs(self, path: typing.Union[str, pathlib.Path]) -> NoneType:
|
3127 | 3128 | mapping.register(DownloadImpl, Download)
|
3128 | 3129 |
|
3129 | 3130 |
|
| 3131 | +class Video(AsyncBase): |
| 3132 | + def __init__(self, obj: VideoImpl): |
| 3133 | + super().__init__(obj) |
| 3134 | + |
| 3135 | + async def path(self) -> str: |
| 3136 | + """Video.path |
| 3137 | +
|
| 3138 | + Returns the file system path this video will be recorded to. The video is guaranteed to be written to the filesystem upon closing the browser context. |
| 3139 | +
|
| 3140 | + Returns |
| 3141 | + ------- |
| 3142 | + str |
| 3143 | + """ |
| 3144 | + return mapping.from_maybe_impl(await self._impl_obj.path()) |
| 3145 | + |
| 3146 | + |
| 3147 | +mapping.register(VideoImpl, Video) |
| 3148 | + |
| 3149 | + |
3130 | 3150 | class BindingCall(AsyncBase):
|
3131 | 3151 | def __init__(self, obj: BindingCallImpl):
|
3132 | 3152 | super().__init__(obj)
|
@@ -3235,6 +3255,18 @@ def workers(self) -> typing.List["Worker"]:
|
3235 | 3255 | """
|
3236 | 3256 | return mapping.from_impl_list(self._impl_obj.workers)
|
3237 | 3257 |
|
| 3258 | + @property |
| 3259 | + def video(self) -> typing.Union["Video", NoneType]: |
| 3260 | + """Page.video |
| 3261 | +
|
| 3262 | + Video object associated with this page. |
| 3263 | +
|
| 3264 | + Returns |
| 3265 | + ------- |
| 3266 | + Optional[Video] |
| 3267 | + """ |
| 3268 | + return mapping.from_impl_nullable(self._impl_obj.video) |
| 3269 | + |
3238 | 3270 | def remove_listener(self, event: str, f: typing.Any) -> NoneType:
|
3239 | 3271 | return mapping.from_maybe_impl(
|
3240 | 3272 | self._impl_obj.remove_listener(event=event, f=mapping.to_impl(f))
|
|
0 commit comments