Skip to content

Commit c35ec2e

Browse files
feat(roll): roll Playwright to 1.11.0-next-1620085974000 (microsoft#632)
1 parent 82885a1 commit c35ec2e

File tree

10 files changed

+52
-28
lines changed

10 files changed

+52
-28
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ repos:
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
9-
exclude: ^playwright/drivers/browsers.json$
109
- id: check-yaml
1110
- id: check-toml
1211
- id: requirements-txt-fixer
@@ -19,10 +18,10 @@ repos:
1918
hooks:
2019
- id: mypy
2120
- repo: https://gitlab.com/pycqa/flake8
22-
rev: 3.8.4
21+
rev: 3.9.1
2322
hooks:
2423
- id: flake8
2524
- repo: https://github.com/pycqa/isort
26-
rev: 5.7.0
25+
rev: 5.8.0
2726
hooks:
2827
- id: isort

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Playwright is a Python library to automate [Chromium](https://www.chromium.org/H
88
| :--- | :---: | :---: | :---: |
99
| Chromium <!-- GEN:chromium-version -->91.0.4469.0<!-- GEN:stop --> ||||
1010
| WebKit <!-- GEN:webkit-version -->14.2<!-- GEN:stop --> ||||
11-
| Firefox <!-- GEN:firefox-version -->88.0b8<!-- GEN:stop --> ||||
11+
| Firefox <!-- GEN:firefox-version -->89.0b2<!-- GEN:stop --> ||||
1212

1313
Headless execution is supported for all browsers on all platforms.
1414

local-requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
auditwheel==3.3.1
22
autobahn==21.3.1
33
black==20.8b1
4-
flake8==3.8.4
4+
flake8==3.9.1
55
flaky==3.7.0
66
mypy==0.812
77
objgraph==3.5.0
8-
pandas==1.2.3
9-
Pillow==8.1.1
8+
pandas==1.2.4
9+
Pillow==8.2.0
1010
pixelmatch==0.2.3
1111
pre-commit==2.10.1
1212
pyOpenSSL==20.0.1
@@ -19,7 +19,7 @@ pytest-timeout==1.4.2
1919
pytest-xdist==2.2.1
2020
requests==2.25.1
2121
service_identity==18.1.0
22-
setuptools==54.0.0
22+
setuptools==56.0.0
2323
twine==3.3.0
2424
twisted==21.2.0
2525
wheel==0.36.2

playwright/_impl/_helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"chrome-beta",
6060
"chrome-canary",
6161
"chrome-dev",
62+
"firefox-stable",
6263
"msedge",
6364
"msedge-beta",
6465
"msedge-canary",

playwright/async_api/_generated.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,7 @@ async def type(self, text: str, *, delay: float = None) -> NoneType:
784784
```
785785
786786
> NOTE: Modifier keys DO NOT effect `keyboard.type`. Holding down `Shift` will not type the text in upper case.
787+
> NOTE: For characters that are not on a US keyboard, only an `input` event will be sent.
787788
788789
Parameters
789790
----------
@@ -6228,6 +6229,9 @@ async def emulate_media(
62286229
) -> NoneType:
62296230
"""Page.emulate_media
62306231
6232+
This method changes the `CSS media type` through the `media` argument, and/or the `'prefers-colors-scheme'` media
6233+
feature, using the `colorScheme` argument.
6234+
62316235
```py
62326236
await page.evaluate(\"matchMedia('screen').matches\")
62336237
# → True
@@ -8907,9 +8911,11 @@ async def new_context(
89078911
accept_downloads : Union[bool, NoneType]
89088912
Whether to automatically download all the attachments. Defaults to `false` where all the downloads are canceled.
89098913
proxy : Union[{server: str, bypass: Union[str, NoneType], username: Union[str, NoneType], password: Union[str, NoneType]}, NoneType]
8910-
Network proxy settings to use with this context. Note that browser needs to be launched with the global proxy for this
8911-
option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example
8912-
`launch({ proxy: { server: 'per-context' } })`.
8914+
Network proxy settings to use with this context.
8915+
8916+
> NOTE: For Chromium on Windows the browser needs to be launched with the global proxy for this option to work. If all
8917+
contexts override the proxy, global proxy will be never used and can be any string, for example `launch({ proxy: {
8918+
server: 'http://per-context' } })`.
89138919
record_har_path : Union[pathlib.Path, str, NoneType]
89148920
Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into the specified HAR file on the
89158921
filesystem. If not specified, the HAR is not recorded. Make sure to call `browser_context.close()` for the HAR to
@@ -9052,9 +9058,11 @@ async def new_page(
90529058
accept_downloads : Union[bool, NoneType]
90539059
Whether to automatically download all the attachments. Defaults to `false` where all the downloads are canceled.
90549060
proxy : Union[{server: str, bypass: Union[str, NoneType], username: Union[str, NoneType], password: Union[str, NoneType]}, NoneType]
9055-
Network proxy settings to use with this context. Note that browser needs to be launched with the global proxy for this
9056-
option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example
9057-
`launch({ proxy: { server: 'per-context' } })`.
9061+
Network proxy settings to use with this context.
9062+
9063+
> NOTE: For Chromium on Windows the browser needs to be launched with the global proxy for this option to work. If all
9064+
contexts override the proxy, global proxy will be never used and can be any string, for example `launch({ proxy: {
9065+
server: 'http://per-context' } })`.
90589066
record_har_path : Union[pathlib.Path, str, NoneType]
90599067
Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into the specified HAR file on the
90609068
filesystem. If not specified, the HAR is not recorded. Make sure to call `browser_context.close()` for the HAR to
@@ -9249,6 +9257,7 @@ async def launch(
92499257
"chrome-beta",
92509258
"chrome-canary",
92519259
"chrome-dev",
9260+
"firefox-stable",
92529261
"msedge",
92539262
"msedge-beta",
92549263
"msedge-canary",
@@ -9304,7 +9313,7 @@ async def launch(
93049313
Path to a browser executable to run instead of the bundled one. If `executablePath` is a relative path, then it is
93059314
resolved relative to the current working directory. Note that Playwright only works with the bundled Chromium, Firefox
93069315
or WebKit, use at your own risk.
9307-
channel : Union["chrome", "chrome-beta", "chrome-canary", "chrome-dev", "msedge", "msedge-beta", "msedge-canary", "msedge-dev", NoneType]
9316+
channel : Union["chrome", "chrome-beta", "chrome-canary", "chrome-dev", "firefox-stable", "msedge", "msedge-beta", "msedge-canary", "msedge-dev", NoneType]
93089317
Browser distribution channel. Read more about using
93099318
[Google Chrome and Microsoft Edge](./browsers.md#google-chrome--microsoft-edge).
93109319
args : Union[List[str], NoneType]
@@ -9383,6 +9392,7 @@ async def launch_persistent_context(
93839392
"chrome-beta",
93849393
"chrome-canary",
93859394
"chrome-dev",
9395+
"firefox-stable",
93869396
"msedge",
93879397
"msedge-beta",
93889398
"msedge-canary",
@@ -9440,7 +9450,7 @@ async def launch_persistent_context(
94409450
[Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and
94419451
[Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile). Note that Chromium's user
94429452
data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`.
9443-
channel : Union["chrome", "chrome-beta", "chrome-canary", "chrome-dev", "msedge", "msedge-beta", "msedge-canary", "msedge-dev", NoneType]
9453+
channel : Union["chrome", "chrome-beta", "chrome-canary", "chrome-dev", "firefox-stable", "msedge", "msedge-beta", "msedge-canary", "msedge-dev", NoneType]
94449454
Browser distribution channel. Read more about using
94459455
[Google Chrome and Microsoft Edge](./browsers.md#google-chrome--microsoft-edge).
94469456
executable_path : Union[pathlib.Path, str, NoneType]

playwright/sync_api/_generated.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,7 @@ def type(self, text: str, *, delay: float = None) -> NoneType:
782782
```
783783
784784
> NOTE: Modifier keys DO NOT effect `keyboard.type`. Holding down `Shift` will not type the text in upper case.
785+
> NOTE: For characters that are not on a US keyboard, only an `input` event will be sent.
785786
786787
Parameters
787788
----------
@@ -6190,6 +6191,9 @@ def emulate_media(
61906191
) -> NoneType:
61916192
"""Page.emulate_media
61926193
6194+
This method changes the `CSS media type` through the `media` argument, and/or the `'prefers-colors-scheme'` media
6195+
feature, using the `colorScheme` argument.
6196+
61936197
```py
61946198
page.evaluate(\"matchMedia('screen').matches\")
61956199
# → True
@@ -8853,9 +8857,11 @@ def new_context(
88538857
accept_downloads : Union[bool, NoneType]
88548858
Whether to automatically download all the attachments. Defaults to `false` where all the downloads are canceled.
88558859
proxy : Union[{server: str, bypass: Union[str, NoneType], username: Union[str, NoneType], password: Union[str, NoneType]}, NoneType]
8856-
Network proxy settings to use with this context. Note that browser needs to be launched with the global proxy for this
8857-
option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example
8858-
`launch({ proxy: { server: 'per-context' } })`.
8860+
Network proxy settings to use with this context.
8861+
8862+
> NOTE: For Chromium on Windows the browser needs to be launched with the global proxy for this option to work. If all
8863+
contexts override the proxy, global proxy will be never used and can be any string, for example `launch({ proxy: {
8864+
server: 'http://per-context' } })`.
88598865
record_har_path : Union[pathlib.Path, str, NoneType]
88608866
Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into the specified HAR file on the
88618867
filesystem. If not specified, the HAR is not recorded. Make sure to call `browser_context.close()` for the HAR to
@@ -8998,9 +9004,11 @@ def new_page(
89989004
accept_downloads : Union[bool, NoneType]
89999005
Whether to automatically download all the attachments. Defaults to `false` where all the downloads are canceled.
90009006
proxy : Union[{server: str, bypass: Union[str, NoneType], username: Union[str, NoneType], password: Union[str, NoneType]}, NoneType]
9001-
Network proxy settings to use with this context. Note that browser needs to be launched with the global proxy for this
9002-
option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example
9003-
`launch({ proxy: { server: 'per-context' } })`.
9007+
Network proxy settings to use with this context.
9008+
9009+
> NOTE: For Chromium on Windows the browser needs to be launched with the global proxy for this option to work. If all
9010+
contexts override the proxy, global proxy will be never used and can be any string, for example `launch({ proxy: {
9011+
server: 'http://per-context' } })`.
90049012
record_har_path : Union[pathlib.Path, str, NoneType]
90059013
Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into the specified HAR file on the
90069014
filesystem. If not specified, the HAR is not recorded. Make sure to call `browser_context.close()` for the HAR to
@@ -9195,6 +9203,7 @@ def launch(
91959203
"chrome-beta",
91969204
"chrome-canary",
91979205
"chrome-dev",
9206+
"firefox-stable",
91989207
"msedge",
91999208
"msedge-beta",
92009209
"msedge-canary",
@@ -9250,7 +9259,7 @@ def launch(
92509259
Path to a browser executable to run instead of the bundled one. If `executablePath` is a relative path, then it is
92519260
resolved relative to the current working directory. Note that Playwright only works with the bundled Chromium, Firefox
92529261
or WebKit, use at your own risk.
9253-
channel : Union["chrome", "chrome-beta", "chrome-canary", "chrome-dev", "msedge", "msedge-beta", "msedge-canary", "msedge-dev", NoneType]
9262+
channel : Union["chrome", "chrome-beta", "chrome-canary", "chrome-dev", "firefox-stable", "msedge", "msedge-beta", "msedge-canary", "msedge-dev", NoneType]
92549263
Browser distribution channel. Read more about using
92559264
[Google Chrome and Microsoft Edge](./browsers.md#google-chrome--microsoft-edge).
92569265
args : Union[List[str], NoneType]
@@ -9329,6 +9338,7 @@ def launch_persistent_context(
93299338
"chrome-beta",
93309339
"chrome-canary",
93319340
"chrome-dev",
9341+
"firefox-stable",
93329342
"msedge",
93339343
"msedge-beta",
93349344
"msedge-canary",
@@ -9386,7 +9396,7 @@ def launch_persistent_context(
93869396
[Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and
93879397
[Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile). Note that Chromium's user
93889398
data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`.
9389-
channel : Union["chrome", "chrome-beta", "chrome-canary", "chrome-dev", "msedge", "msedge-beta", "msedge-canary", "msedge-dev", NoneType]
9399+
channel : Union["chrome", "chrome-beta", "chrome-canary", "chrome-dev", "firefox-stable", "msedge", "msedge-beta", "msedge-canary", "msedge-dev", NoneType]
93909400
Browser distribution channel. Read more about using
93919401
[Google Chrome and Microsoft Edge](./browsers.md#google-chrome--microsoft-edge).
93929402
executable_path : Union[pathlib.Path, str, NoneType]

scripts/expected_api_mismatch.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ Parameter type mismatch in Page.unroute(handler=): documented as Union[Callable[
1616
# Get vs set cookies
1717
Parameter type mismatch in BrowserContext.storage_state(return=): documented as {cookies: List[{name: str, value: str, domain: str, path: str, expires: float, httpOnly: bool, secure: bool, sameSite: Union["Lax", "None", "Strict"]}], origins: List[{origin: str, localStorage: List[{name: str, value: str}]}]}, code has {cookies: Union[List[{name: str, value: str, url: Union[str, NoneType], domain: Union[str, NoneType], path: Union[str, NoneType], expires: Union[float, NoneType], httpOnly: Union[bool, NoneType], secure: Union[bool, NoneType], sameSite: Union["Lax", "None", "Strict", NoneType]}], NoneType], origins: Union[List[{origin: str, localStorage: List[{name: str, value: str}]}], NoneType]}
1818
Parameter type mismatch in BrowserContext.cookies(return=): documented as List[{name: str, value: str, domain: str, path: str, expires: float, httpOnly: bool, secure: bool, sameSite: Union["Lax", "None", "Strict"]}], code has List[{name: str, value: str, url: Union[str, NoneType], domain: Union[str, NoneType], path: Union[str, NoneType], expires: Union[float, NoneType], httpOnly: Union[bool, NoneType], secure: Union[bool, NoneType], sameSite: Union["Lax", "None", "Strict", NoneType]}]
19+
# Temporary Fix
20+
Method not implemented: Error.name
21+
Method not implemented: Error.stack
22+
Method not implemented: Error.message

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
InWheel = None
2929
from wheel.bdist_wheel import bdist_wheel as BDistWheelCommand
3030

31-
driver_version = "1.11.0-next-1619452681000"
31+
driver_version = "1.11.0-next-1620085974000"
3232

3333

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

tests/async/test_navigation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ def expect_ssl_error(error_message: str, browser_name: str) -> None:
969969
if sys.platform == "darwin":
970970
assert "The certificate for this server is invalid" in error_message
971971
elif sys.platform == "win32":
972-
assert "SSL connect error" in error_message
972+
assert "SSL peer certificate or SSH remote key was not OK" in error_message
973973
else:
974974
assert "Unacceptable TLS certificate" in error_message
975975
else:

tests/async/test_page.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ async def test_close_should_run_beforeunload_if_asked_for(
5858
assert dialog.message == "Leave?"
5959
else:
6060
assert (
61-
dialog.message
62-
== "This page is asking you to confirm that you want to leave — information you’ve entered may not be saved."
61+
"This page is asking you to confirm that you want to leave"
62+
in dialog.message
6363
)
6464
async with page.expect_event("close"):
6565
await dialog.accept()

0 commit comments

Comments
 (0)