@@ -10647,7 +10647,10 @@ async def new_context(
1064710647 storage_state: typing.Union[StorageState, str, pathlib.Path] = None,
1064810648 base_url: str = None,
1064910649 strict_selectors: bool = None,
10650- service_workers: Literal["allow", "block"] = None
10650+ service_workers: Literal["allow", "block"] = None,
10651+ record_har_url_filter: typing.Union[str, typing.Pattern] = None,
10652+ record_har_mode: Literal["full", "minimal"] = None,
10653+ record_har_content: Literal["attach", "embed", "omit"] = None
1065110654 ) -> "BrowserContext":
1065210655 """Browser.new_context
1065310656
@@ -10756,6 +10759,14 @@ async def new_context(
1075610759 Whether to allow sites to register Service workers. Defaults to `'allow'`.
1075710760 - `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be registered.
1075810761 - `'block'`: Playwright will block all registration of Service Workers.
10762+ record_har_url_filter : Union[Pattern, str, NoneType]
10763+ record_har_mode : Union["full", "minimal", NoneType]
10764+ When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies,
10765+ security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
10766+ record_har_content : Union["attach", "embed", "omit", NoneType]
10767+ Optional setting to control resource content management. If `omit` is specified, content is not persisted. If `attach`
10768+ is specified, resources are persistet as separate files and all of these files are archived along with the HAR file.
10769+ Defaults to `embed`, which stores content inline the HAR file as per HAR specification.
1075910770
1076010771 Returns
1076110772 -------
@@ -10795,6 +10806,9 @@ async def new_context(
1079510806 baseURL=base_url,
1079610807 strictSelectors=strict_selectors,
1079710808 serviceWorkers=service_workers,
10809+ recordHarUrlFilter=record_har_url_filter,
10810+ recordHarMode=record_har_mode,
10811+ recordHarContent=record_har_content,
1079810812 )
1079910813 )
1080010814
@@ -10831,7 +10845,10 @@ async def new_page(
1083110845 storage_state: typing.Union[StorageState, str, pathlib.Path] = None,
1083210846 base_url: str = None,
1083310847 strict_selectors: bool = None,
10834- service_workers: Literal["allow", "block"] = None
10848+ service_workers: Literal["allow", "block"] = None,
10849+ record_har_url_filter: typing.Union[str, typing.Pattern] = None,
10850+ record_har_mode: Literal["full", "minimal"] = None,
10851+ record_har_content: Literal["attach", "embed", "omit"] = None
1083510852 ) -> "Page":
1083610853 """Browser.new_page
1083710854
@@ -10935,6 +10952,14 @@ async def new_page(
1093510952 Whether to allow sites to register Service workers. Defaults to `'allow'`.
1093610953 - `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be registered.
1093710954 - `'block'`: Playwright will block all registration of Service Workers.
10955+ record_har_url_filter : Union[Pattern, str, NoneType]
10956+ record_har_mode : Union["full", "minimal", NoneType]
10957+ When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies,
10958+ security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
10959+ record_har_content : Union["attach", "embed", "omit", NoneType]
10960+ Optional setting to control resource content management. If `omit` is specified, content is not persisted. If `attach`
10961+ is specified, resources are persistet as separate files and all of these files are archived along with the HAR file.
10962+ Defaults to `embed`, which stores content inline the HAR file as per HAR specification.
1093810963
1093910964 Returns
1094010965 -------
@@ -10974,6 +10999,9 @@ async def new_page(
1097410999 baseURL=base_url,
1097511000 strictSelectors=strict_selectors,
1097611001 serviceWorkers=service_workers,
11002+ recordHarUrlFilter=record_har_url_filter,
11003+ recordHarMode=record_har_mode,
11004+ recordHarContent=record_har_content,
1097711005 )
1097811006 )
1097911007
@@ -11269,7 +11297,10 @@ async def launch_persistent_context(
1126911297 record_video_size: ViewportSize = None,
1127011298 base_url: str = None,
1127111299 strict_selectors: bool = None,
11272- service_workers: Literal["allow", "block"] = None
11300+ service_workers: Literal["allow", "block"] = None,
11301+ record_har_url_filter: typing.Union[str, typing.Pattern] = None,
11302+ record_har_mode: Literal["full", "minimal"] = None,
11303+ record_har_content: Literal["attach", "embed", "omit"] = None
1127311304 ) -> "BrowserContext":
1127411305 """BrowserType.launch_persistent_context
1127511306
@@ -11413,6 +11444,14 @@ async def launch_persistent_context(
1141311444 Whether to allow sites to register Service workers. Defaults to `'allow'`.
1141411445 - `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be registered.
1141511446 - `'block'`: Playwright will block all registration of Service Workers.
11447+ record_har_url_filter : Union[Pattern, str, NoneType]
11448+ record_har_mode : Union["full", "minimal", NoneType]
11449+ When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies,
11450+ security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
11451+ record_har_content : Union["attach", "embed", "omit", NoneType]
11452+ Optional setting to control resource content management. If `omit` is specified, content is not persisted. If `attach`
11453+ is specified, resources are persistet as separate files and all of these files are archived along with the HAR file.
11454+ Defaults to `embed`, which stores content inline the HAR file as per HAR specification.
1141611455
1141711456 Returns
1141811457 -------
@@ -11466,6 +11505,9 @@ async def launch_persistent_context(
1146611505 baseURL=base_url,
1146711506 strictSelectors=strict_selectors,
1146811507 serviceWorkers=service_workers,
11508+ recordHarUrlFilter=record_har_url_filter,
11509+ recordHarMode=record_har_mode,
11510+ recordHarContent=record_har_content,
1146911511 )
1147011512 )
1147111513
0 commit comments