Skip to content

Commit 1a4bdf7

Browse files
chore: roll to Playwright v1.10.0 (microsoft#591)
Co-authored-by: Andrey Lushnikov <[email protected]>
1 parent fe485ca commit 1a4bdf7

File tree

5 files changed

+93
-63
lines changed

5 files changed

+93
-63
lines changed

playwright/_impl/_browser_type.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from playwright._impl._browser_context import BrowserContext
2626
from playwright._impl._connection import ChannelOwner, from_channel
2727
from playwright._impl._helper import (
28+
BrowserChannel,
2829
ColorScheme,
2930
Env,
3031
locals_to_params,
@@ -52,7 +53,7 @@ def executable_path(self) -> str:
5253
async def launch(
5354
self,
5455
executablePath: Union[str, Path] = None,
55-
channel: str = None,
56+
channel: BrowserChannel = None,
5657
args: List[str] = None,
5758
ignoreDefaultArgs: Union[bool, List[str]] = None,
5859
handleSIGINT: bool = None,
@@ -80,7 +81,7 @@ async def launch(
8081
async def launch_persistent_context(
8182
self,
8283
userDataDir: Union[str, Path],
83-
channel: str = None,
84+
channel: BrowserChannel = None,
8485
executablePath: Union[str, Path] = None,
8586
args: List[str] = None,
8687
ignoreDefaultArgs: Union[bool, List[str]] = None,

playwright/_impl/_helper.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@
5252
KeyboardModifier = Literal["Alt", "Control", "Meta", "Shift"]
5353
MouseButton = Literal["left", "middle", "right"]
5454

55+
BrowserChannel = Literal[
56+
"chrome",
57+
"chrome-beta",
58+
"chrome-canary",
59+
"chrome-dev",
60+
"msedge",
61+
"msedge-beta",
62+
"msedge-canary",
63+
"msedge-dev",
64+
]
65+
5566

5667
class ErrorPayload(TypedDict, total=False):
5768
message: str

playwright/async_api/_generated.py

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -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

playwright/sync_api/_generated.py

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -8587,11 +8585,14 @@ def new_context(
85878585
option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example
85888586
`launch({ proxy: { server: 'per-context' } })`.
85898587
record_har_path : Union[pathlib.Path, str, NoneType]
8590-
Path on the filesystem to write the HAR file to.
8588+
Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into the specified HAR file on the
8589+
filesystem. If not specified, the HAR is not recorded. Make sure to call `browser_context.close()` for the HAR to
8590+
be saved.
85918591
record_har_omit_content : Union[bool, NoneType]
85928592
Optional setting to control whether to omit request content from the HAR. Defaults to `false`.
85938593
record_video_dir : Union[pathlib.Path, str, NoneType]
8594-
Path to the directory to put videos into.
8594+
Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure
8595+
to call `browser_context.close()` for videos to be saved.
85958596
record_video_size : Union[{width: int, height: int}, NoneType]
85968597
Dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into
85978598
800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will
@@ -8724,11 +8725,14 @@ def new_page(
87248725
option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example
87258726
`launch({ proxy: { server: 'per-context' } })`.
87268727
record_har_path : Union[pathlib.Path, str, NoneType]
8727-
Path on the filesystem to write the HAR file to.
8728+
Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into the specified HAR file on the
8729+
filesystem. If not specified, the HAR is not recorded. Make sure to call `browser_context.close()` for the HAR to
8730+
be saved.
87288731
record_har_omit_content : Union[bool, NoneType]
87298732
Optional setting to control whether to omit request content from the HAR. Defaults to `false`.
87308733
record_video_dir : Union[pathlib.Path, str, NoneType]
8731-
Path to the directory to put videos into.
8734+
Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure
8735+
to call `browser_context.close()` for videos to be saved.
87328736
record_video_size : Union[{width: int, height: int}, NoneType]
87338737
Dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into
87348738
800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will
@@ -8828,7 +8832,16 @@ def launch(
88288832
self,
88298833
*,
88308834
executable_path: typing.Union[str, pathlib.Path] = None,
8831-
channel: str = None,
8835+
channel: Literal[
8836+
"chrome",
8837+
"chrome-beta",
8838+
"chrome-canary",
8839+
"chrome-dev",
8840+
"msedge",
8841+
"msedge-beta",
8842+
"msedge-canary",
8843+
"msedge-dev",
8844+
] = None,
88328845
args: typing.List[str] = None,
88338846
ignore_default_args: typing.Union[bool, typing.List[str]] = None,
88348847
handle_sigint: bool = None,
@@ -8879,16 +8892,8 @@ def launch(
88798892
Path to a browser executable to run instead of the bundled one. If `executablePath` is a relative path, then it is
88808893
resolved relative to the current working directory. Note that Playwright only works with the bundled Chromium, Firefox
88818894
or WebKit, use at your own risk.
8882-
channel : Union[str, NoneType]
8883-
Chromium distribution channel, one of
8884-
- chrome
8885-
- chrome-beta
8886-
- chrome-dev
8887-
- chrome-canary
8888-
- msedge
8889-
- msedge-beta
8890-
- msedge-dev
8891-
- msedge-canary
8895+
channel : Union["chrome", "chrome-beta", "chrome-canary", "chrome-dev", "msedge", "msedge-beta", "msedge-canary", "msedge-dev", NoneType]
8896+
Browser distribution channel.
88928897
args : Union[List[str], NoneType]
88938898
Additional arguments to pass to the browser instance. The list of Chromium flags can be found
88948899
[here](http://peter.sh/experiments/chromium-command-line-switches/).
@@ -8960,7 +8965,16 @@ def launch_persistent_context(
89608965
self,
89618966
user_data_dir: typing.Union[str, pathlib.Path],
89628967
*,
8963-
channel: str = None,
8968+
channel: Literal[
8969+
"chrome",
8970+
"chrome-beta",
8971+
"chrome-canary",
8972+
"chrome-dev",
8973+
"msedge",
8974+
"msedge-beta",
8975+
"msedge-canary",
8976+
"msedge-dev",
8977+
] = None,
89648978
executable_path: typing.Union[str, pathlib.Path] = None,
89658979
args: typing.List[str] = None,
89668980
ignore_default_args: typing.Union[bool, typing.List[str]] = None,
@@ -9012,16 +9026,8 @@ def launch_persistent_context(
90129026
[Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and
90139027
[Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile). Note that Chromium's user
90149028
data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`.
9015-
channel : Union[str, NoneType]
9016-
Chromium distribution channel, one of
9017-
- chrome
9018-
- chrome-beta
9019-
- chrome-dev
9020-
- chrome-canary
9021-
- msedge
9022-
- msedge-beta
9023-
- msedge-dev
9024-
- msedge-canary
9029+
channel : Union["chrome", "chrome-beta", "chrome-canary", "chrome-dev", "msedge", "msedge-beta", "msedge-canary", "msedge-dev", NoneType]
9030+
Browser distribution channel.
90259031
executable_path : Union[pathlib.Path, str, NoneType]
90269032
Path to a browser executable to run instead of the bundled one. If `executablePath` is a relative path, then it is
90279033
resolved relative to the current working directory. **BEWARE**: Playwright is only guaranteed to work with the bundled
@@ -9103,11 +9109,14 @@ def launch_persistent_context(
91039109
chromium_sandbox : Union[bool, NoneType]
91049110
Enable Chromium sandboxing. Defaults to `true`.
91059111
record_har_path : Union[pathlib.Path, str, NoneType]
9106-
Path on the filesystem to write the HAR file to.
9112+
Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into the specified HAR file on the
9113+
filesystem. If not specified, the HAR is not recorded. Make sure to call `browser_context.close()` for the HAR to
9114+
be saved.
91079115
record_har_omit_content : Union[bool, NoneType]
91089116
Optional setting to control whether to omit request content from the HAR. Defaults to `false`.
91099117
record_video_dir : Union[pathlib.Path, str, NoneType]
9110-
Path to the directory to put videos into.
9118+
Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure
9119+
to call `browser_context.close()` for videos to be saved.
91119120
record_video_size : Union[{width: int, height: int}, NoneType]
91129121
Dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into
91139122
800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from auditwheel.wheeltools import InWheel
2525
from wheel.bdist_wheel import bdist_wheel as BDistWheelCommand
2626

27-
driver_version = "1.10.0-next-1616094973000"
27+
driver_version = "1.10.0-next-1616530863000"
2828

2929

3030
def extractall(zip: zipfile.ZipFile, path: str) -> None:

0 commit comments

Comments
 (0)