@@ -92,8 +92,6 @@ def resource_type(self) -> str:
9292 following: `document`, `stylesheet`, `image`, `media`, `font`, `script`, `texttrack`, `xhr`, `fetch`, `eventsource`,
9393 `websocket`, `manifest`, `other`.
9494
95- > NOTE: The resource types are available as constants in [ResourceTypes].
96-
9795 Returns
9896 -------
9997 str
@@ -8641,11 +8639,14 @@ async def new_context(
86418639 option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example
86428640 `launch({ proxy: { server: 'per-context' } })`.
86438641 record_har_path : Union[pathlib.Path, str, NoneType]
8644- Path on the filesystem to write the HAR file to.
8642+ Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into the specified HAR file on the
8643+ filesystem. If not specified, the HAR is not recorded. Make sure to call `browser_context.close()` for the HAR to
8644+ be saved.
86458645 record_har_omit_content : Union[bool, NoneType]
86468646 Optional setting to control whether to omit request content from the HAR. Defaults to `false`.
86478647 record_video_dir : Union[pathlib.Path, str, NoneType]
8648- Path to the directory to put videos into.
8648+ Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure
8649+ to call `browser_context.close()` for videos to be saved.
86498650 record_video_size : Union[{width: int, height: int}, NoneType]
86508651 Dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into
86518652 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will
@@ -8778,11 +8779,14 @@ async def new_page(
87788779 option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example
87798780 `launch({ proxy: { server: 'per-context' } })`.
87808781 record_har_path : Union[pathlib.Path, str, NoneType]
8781- Path on the filesystem to write the HAR file to.
8782+ Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into the specified HAR file on the
8783+ filesystem. If not specified, the HAR is not recorded. Make sure to call `browser_context.close()` for the HAR to
8784+ be saved.
87828785 record_har_omit_content : Union[bool, NoneType]
87838786 Optional setting to control whether to omit request content from the HAR. Defaults to `false`.
87848787 record_video_dir : Union[pathlib.Path, str, NoneType]
8785- Path to the directory to put videos into.
8788+ Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure
8789+ to call `browser_context.close()` for videos to be saved.
87868790 record_video_size : Union[{width: int, height: int}, NoneType]
87878791 Dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into
87888792 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will
@@ -8882,7 +8886,16 @@ async def launch(
88828886 self ,
88838887 * ,
88848888 executable_path : typing .Union [str , pathlib .Path ] = None ,
8885- channel : str = None ,
8889+ channel : Literal [
8890+ "chrome" ,
8891+ "chrome-beta" ,
8892+ "chrome-canary" ,
8893+ "chrome-dev" ,
8894+ "msedge" ,
8895+ "msedge-beta" ,
8896+ "msedge-canary" ,
8897+ "msedge-dev" ,
8898+ ] = None ,
88868899 args : typing .List [str ] = None ,
88878900 ignore_default_args : typing .Union [bool , typing .List [str ]] = None ,
88888901 handle_sigint : bool = None ,
@@ -8933,16 +8946,8 @@ async def launch(
89338946 Path to a browser executable to run instead of the bundled one. If `executablePath` is a relative path, then it is
89348947 resolved relative to the current working directory. Note that Playwright only works with the bundled Chromium, Firefox
89358948 or WebKit, use at your own risk.
8936- channel : Union[str, NoneType]
8937- Chromium distribution channel, one of
8938- - chrome
8939- - chrome-beta
8940- - chrome-dev
8941- - chrome-canary
8942- - msedge
8943- - msedge-beta
8944- - msedge-dev
8945- - msedge-canary
8949+ channel : Union["chrome", "chrome-beta", "chrome-canary", "chrome-dev", "msedge", "msedge-beta", "msedge-canary", "msedge-dev", NoneType]
8950+ Browser distribution channel.
89468951 args : Union[List[str], NoneType]
89478952 Additional arguments to pass to the browser instance. The list of Chromium flags can be found
89488953 [here](http://peter.sh/experiments/chromium-command-line-switches/).
@@ -9014,7 +9019,16 @@ async def launch_persistent_context(
90149019 self ,
90159020 user_data_dir : typing .Union [str , pathlib .Path ],
90169021 * ,
9017- channel : str = None ,
9022+ channel : Literal [
9023+ "chrome" ,
9024+ "chrome-beta" ,
9025+ "chrome-canary" ,
9026+ "chrome-dev" ,
9027+ "msedge" ,
9028+ "msedge-beta" ,
9029+ "msedge-canary" ,
9030+ "msedge-dev" ,
9031+ ] = None ,
90189032 executable_path : typing .Union [str , pathlib .Path ] = None ,
90199033 args : typing .List [str ] = None ,
90209034 ignore_default_args : typing .Union [bool , typing .List [str ]] = None ,
@@ -9066,16 +9080,8 @@ async def launch_persistent_context(
90669080 [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and
90679081 [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile). Note that Chromium's user
90689082 data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`.
9069- channel : Union[str, NoneType]
9070- Chromium distribution channel, one of
9071- - chrome
9072- - chrome-beta
9073- - chrome-dev
9074- - chrome-canary
9075- - msedge
9076- - msedge-beta
9077- - msedge-dev
9078- - msedge-canary
9083+ channel : Union["chrome", "chrome-beta", "chrome-canary", "chrome-dev", "msedge", "msedge-beta", "msedge-canary", "msedge-dev", NoneType]
9084+ Browser distribution channel.
90799085 executable_path : Union[pathlib.Path, str, NoneType]
90809086 Path to a browser executable to run instead of the bundled one. If `executablePath` is a relative path, then it is
90819087 resolved relative to the current working directory. **BEWARE**: Playwright is only guaranteed to work with the bundled
@@ -9157,11 +9163,14 @@ async def launch_persistent_context(
91579163 chromium_sandbox : Union[bool, NoneType]
91589164 Enable Chromium sandboxing. Defaults to `true`.
91599165 record_har_path : Union[pathlib.Path, str, NoneType]
9160- Path on the filesystem to write the HAR file to.
9166+ Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into the specified HAR file on the
9167+ filesystem. If not specified, the HAR is not recorded. Make sure to call `browser_context.close()` for the HAR to
9168+ be saved.
91619169 record_har_omit_content : Union[bool, NoneType]
91629170 Optional setting to control whether to omit request content from the HAR. Defaults to `false`.
91639171 record_video_dir : Union[pathlib.Path, str, NoneType]
9164- Path to the directory to put videos into.
9172+ Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure
9173+ to call `browser_context.close()` for videos to be saved.
91659174 record_video_size : Union[{width: int, height: int}, NoneType]
91669175 Dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into
91679176 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will
0 commit comments