@@ -10730,7 +10730,10 @@ async def new_context(
10730
10730
storage_state: typing.Union[StorageState, str, pathlib.Path] = None,
10731
10731
base_url: str = None,
10732
10732
strict_selectors: bool = None,
10733
- service_workers: Literal["allow", "block"] = None
10733
+ service_workers: Literal["allow", "block"] = None,
10734
+ record_har_url_filter: typing.Union[str, typing.Pattern] = None,
10735
+ record_har_mode: Literal["full", "minimal"] = None,
10736
+ record_har_content: Literal["attach", "embed", "omit"] = None
10734
10737
) -> "BrowserContext":
10735
10738
"""Browser.new_context
10736
10739
@@ -10839,6 +10842,14 @@ async def new_context(
10839
10842
Whether to allow sites to register Service workers. Defaults to `'allow'`.
10840
10843
- `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be registered.
10841
10844
- `'block'`: Playwright will block all registration of Service Workers.
10845
+ record_har_url_filter : Union[Pattern, str, NoneType]
10846
+ record_har_mode : Union["full", "minimal", NoneType]
10847
+ When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies,
10848
+ security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
10849
+ record_har_content : Union["attach", "embed", "omit", NoneType]
10850
+ Optional setting to control resource content management. If `omit` is specified, content is not persisted. If `attach`
10851
+ is specified, resources are persistet as separate files and all of these files are archived along with the HAR file.
10852
+ Defaults to `embed`, which stores content inline the HAR file as per HAR specification.
10842
10853
10843
10854
Returns
10844
10855
-------
@@ -10878,6 +10889,9 @@ async def new_context(
10878
10889
baseURL=base_url,
10879
10890
strictSelectors=strict_selectors,
10880
10891
serviceWorkers=service_workers,
10892
+ recordHarUrlFilter=record_har_url_filter,
10893
+ recordHarMode=record_har_mode,
10894
+ recordHarContent=record_har_content,
10881
10895
)
10882
10896
)
10883
10897
@@ -10914,7 +10928,10 @@ async def new_page(
10914
10928
storage_state: typing.Union[StorageState, str, pathlib.Path] = None,
10915
10929
base_url: str = None,
10916
10930
strict_selectors: bool = None,
10917
- service_workers: Literal["allow", "block"] = None
10931
+ service_workers: Literal["allow", "block"] = None,
10932
+ record_har_url_filter: typing.Union[str, typing.Pattern] = None,
10933
+ record_har_mode: Literal["full", "minimal"] = None,
10934
+ record_har_content: Literal["attach", "embed", "omit"] = None
10918
10935
) -> "Page":
10919
10936
"""Browser.new_page
10920
10937
@@ -11018,6 +11035,14 @@ async def new_page(
11018
11035
Whether to allow sites to register Service workers. Defaults to `'allow'`.
11019
11036
- `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be registered.
11020
11037
- `'block'`: Playwright will block all registration of Service Workers.
11038
+ record_har_url_filter : Union[Pattern, str, NoneType]
11039
+ record_har_mode : Union["full", "minimal", NoneType]
11040
+ When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies,
11041
+ security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
11042
+ record_har_content : Union["attach", "embed", "omit", NoneType]
11043
+ Optional setting to control resource content management. If `omit` is specified, content is not persisted. If `attach`
11044
+ is specified, resources are persistet as separate files and all of these files are archived along with the HAR file.
11045
+ Defaults to `embed`, which stores content inline the HAR file as per HAR specification.
11021
11046
11022
11047
Returns
11023
11048
-------
@@ -11057,6 +11082,9 @@ async def new_page(
11057
11082
baseURL=base_url,
11058
11083
strictSelectors=strict_selectors,
11059
11084
serviceWorkers=service_workers,
11085
+ recordHarUrlFilter=record_har_url_filter,
11086
+ recordHarMode=record_har_mode,
11087
+ recordHarContent=record_har_content,
11060
11088
)
11061
11089
)
11062
11090
@@ -11352,7 +11380,10 @@ async def launch_persistent_context(
11352
11380
record_video_size: ViewportSize = None,
11353
11381
base_url: str = None,
11354
11382
strict_selectors: bool = None,
11355
- service_workers: Literal["allow", "block"] = None
11383
+ service_workers: Literal["allow", "block"] = None,
11384
+ record_har_url_filter: typing.Union[str, typing.Pattern] = None,
11385
+ record_har_mode: Literal["full", "minimal"] = None,
11386
+ record_har_content: Literal["attach", "embed", "omit"] = None
11356
11387
) -> "BrowserContext":
11357
11388
"""BrowserType.launch_persistent_context
11358
11389
@@ -11496,6 +11527,14 @@ async def launch_persistent_context(
11496
11527
Whether to allow sites to register Service workers. Defaults to `'allow'`.
11497
11528
- `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be registered.
11498
11529
- `'block'`: Playwright will block all registration of Service Workers.
11530
+ record_har_url_filter : Union[Pattern, str, NoneType]
11531
+ record_har_mode : Union["full", "minimal", NoneType]
11532
+ When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies,
11533
+ security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
11534
+ record_har_content : Union["attach", "embed", "omit", NoneType]
11535
+ Optional setting to control resource content management. If `omit` is specified, content is not persisted. If `attach`
11536
+ is specified, resources are persistet as separate files and all of these files are archived along with the HAR file.
11537
+ Defaults to `embed`, which stores content inline the HAR file as per HAR specification.
11499
11538
11500
11539
Returns
11501
11540
-------
@@ -11549,6 +11588,9 @@ async def launch_persistent_context(
11549
11588
baseURL=base_url,
11550
11589
strictSelectors=strict_selectors,
11551
11590
serviceWorkers=service_workers,
11591
+ recordHarUrlFilter=record_har_url_filter,
11592
+ recordHarMode=record_har_mode,
11593
+ recordHarContent=record_har_content,
11552
11594
)
11553
11595
)
11554
11596
0 commit comments