Skip to content

chore: roll Playwright to 1.21.0-beta-1649396150000 #1240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Playwright is a Python library to automate [Chromium](https://www.chromium.org/H

| | Linux | macOS | Windows |
| :--- | :---: | :---: | :---: |
| Chromium <!-- GEN:chromium-version -->101.0.4929.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Chromium <!-- GEN:chromium-version -->101.0.4951.15<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| WebKit <!-- GEN:webkit-version -->15.4<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Firefox <!-- GEN:firefox-version -->97.0.1<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Firefox <!-- GEN:firefox-version -->98.0.2<!-- GEN:stop --> | ✅ | ✅ | ✅ |

## Documentation

Expand Down
4 changes: 3 additions & 1 deletion playwright/_impl/_element_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ async def screenshot(
path: Union[str, Path] = None,
quality: int = None,
omitBackground: bool = None,
animations: Literal["disabled"] = None,
animations: Literal["allow", "disabled"] = None,
caret: Literal["hide", "initial"] = None,
scale: Literal["css", "device"] = None,
mask: List["Locator"] = None,
) -> bytes:
params = locals_to_params(locals())
Expand Down
4 changes: 3 additions & 1 deletion playwright/_impl/_locator.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,9 @@ async def screenshot(
path: Union[str, pathlib.Path] = None,
quality: int = None,
omitBackground: bool = None,
animations: Literal["disabled"] = None,
animations: Literal["allow", "disabled"] = None,
caret: Literal["hide", "initial"] = None,
scale: Literal["css", "device"] = None,
mask: List["Locator"] = None,
) -> bytes:
params = locals_to_params(locals())
Expand Down
4 changes: 3 additions & 1 deletion playwright/_impl/_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,9 @@ async def screenshot(
omitBackground: bool = None,
fullPage: bool = None,
clip: FloatRect = None,
animations: Literal["disabled"] = None,
animations: Literal["allow", "disabled"] = None,
caret: Literal["hide", "initial"] = None,
scale: Literal["css", "device"] = None,
mask: List["Locator"] = None,
) -> bytes:
params = locals_to_params(locals())
Expand Down
598 changes: 337 additions & 261 deletions playwright/async_api/_generated.py

Large diffs are not rendered by default.

598 changes: 337 additions & 261 deletions playwright/sync_api/_generated.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/expected_api_mismatch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Parameter not documented: Browser.new_context(default_browser_type=)
Parameter not documented: Browser.new_page(default_browser_type=)

# We don't expand the type of the return value here.
Parameter type mismatch in Accessibility.snapshot(return=): documented as Union[{role: str, name: str, value: Union[float, str, NoneType], description: Union[str, NoneType], keyshortcuts: Union[str, NoneType], roledescription: Union[str, NoneType], valuetext: Union[str, NoneType], disabled: Union[bool, NoneType], expanded: Union[bool, NoneType], focused: Union[bool, NoneType], modal: Union[bool, NoneType], multiline: Union[bool, NoneType], multiselectable: Union[bool, NoneType], readonly: Union[bool, NoneType], required: Union[bool, NoneType], selected: Union[bool, NoneType], checked: Union["mixed", bool, NoneType], pressed: Union["mixed", bool, NoneType], level: Union[int, NoneType], valuemin: Union[float, NoneType], valuemax: Union[float, NoneType], autocomplete: Union[str, NoneType], haspopup: Union[str, NoneType], invalid: Union[str, NoneType], orientation: Union[str, NoneType], children: Union[List[Dict], NoneType]}, NoneType], code has Union[Dict, NoneType]
Parameter type mismatch in Accessibility.snapshot(return=): documented as Union[{role: str, name: str, value: Union[float, str], description: str, keyshortcuts: str, roledescription: str, valuetext: str, disabled: bool, expanded: bool, focused: bool, modal: bool, multiline: bool, multiselectable: bool, readonly: bool, required: bool, selected: bool, checked: Union["mixed", bool], pressed: Union["mixed", bool], level: int, valuemin: float, valuemax: float, autocomplete: str, haspopup: str, invalid: str, orientation: str, children: List[Dict]}, NoneType], code has Union[Dict, NoneType]

# One vs two arguments in the callback, Python explicitly unions.
Parameter type mismatch in BrowserContext.route(handler=): documented as Callable[[Route, Request], Any], code has Union[Callable[[Route, Request], Any], Callable[[Route], Any]]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
InWheel = None
from wheel.bdist_wheel import bdist_wheel as BDistWheelCommand

driver_version = "1.20.0"
driver_version = "1.21.0-beta-1649712128000"


def extractall(zip: zipfile.ZipFile, path: str) -> None:
Expand Down
8 changes: 4 additions & 4 deletions tests/async/test_interception.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,11 +547,11 @@ async def test_page_route_should_support_cors_with_GET(page, server, browser_nam
await page.goto(server.EMPTY_PAGE)

async def handle_route(route, request):
headers = (
{"access-control-allow-origin": "*"}
headers = {
"access-control-allow-origin": "*"
if request.url.endswith("allow")
else {}
)
else "none"
}
await route.fulfill(
content_type="application/json",
headers=headers,
Expand Down