@@ -10647,7 +10647,10 @@ async def new_context(
10647
10647
storage_state: typing.Union[StorageState, str, pathlib.Path] = None,
10648
10648
base_url: str = None,
10649
10649
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
10651
10654
) -> "BrowserContext":
10652
10655
"""Browser.new_context
10653
10656
@@ -10756,6 +10759,14 @@ async def new_context(
10756
10759
Whether to allow sites to register Service workers. Defaults to `'allow'`.
10757
10760
- `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be registered.
10758
10761
- `'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.
10759
10770
10760
10771
Returns
10761
10772
-------
@@ -10795,6 +10806,9 @@ async def new_context(
10795
10806
baseURL=base_url,
10796
10807
strictSelectors=strict_selectors,
10797
10808
serviceWorkers=service_workers,
10809
+ recordHarUrlFilter=record_har_url_filter,
10810
+ recordHarMode=record_har_mode,
10811
+ recordHarContent=record_har_content,
10798
10812
)
10799
10813
)
10800
10814
@@ -10831,7 +10845,10 @@ async def new_page(
10831
10845
storage_state: typing.Union[StorageState, str, pathlib.Path] = None,
10832
10846
base_url: str = None,
10833
10847
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
10835
10852
) -> "Page":
10836
10853
"""Browser.new_page
10837
10854
@@ -10935,6 +10952,14 @@ async def new_page(
10935
10952
Whether to allow sites to register Service workers. Defaults to `'allow'`.
10936
10953
- `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be registered.
10937
10954
- `'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.
10938
10963
10939
10964
Returns
10940
10965
-------
@@ -10974,6 +10999,9 @@ async def new_page(
10974
10999
baseURL=base_url,
10975
11000
strictSelectors=strict_selectors,
10976
11001
serviceWorkers=service_workers,
11002
+ recordHarUrlFilter=record_har_url_filter,
11003
+ recordHarMode=record_har_mode,
11004
+ recordHarContent=record_har_content,
10977
11005
)
10978
11006
)
10979
11007
@@ -11269,7 +11297,10 @@ async def launch_persistent_context(
11269
11297
record_video_size: ViewportSize = None,
11270
11298
base_url: str = None,
11271
11299
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
11273
11304
) -> "BrowserContext":
11274
11305
"""BrowserType.launch_persistent_context
11275
11306
@@ -11413,6 +11444,14 @@ async def launch_persistent_context(
11413
11444
Whether to allow sites to register Service workers. Defaults to `'allow'`.
11414
11445
- `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be registered.
11415
11446
- `'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.
11416
11455
11417
11456
Returns
11418
11457
-------
@@ -11466,6 +11505,9 @@ async def launch_persistent_context(
11466
11505
baseURL=base_url,
11467
11506
strictSelectors=strict_selectors,
11468
11507
serviceWorkers=service_workers,
11508
+ recordHarUrlFilter=record_har_url_filter,
11509
+ recordHarMode=record_har_mode,
11510
+ recordHarContent=record_har_content,
11469
11511
)
11470
11512
)
11471
11513
0 commit comments