Skip to content

feat(roll): roll Playwright to 1.13.0-next-1625101008000 #784

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 1 commit into from
Jul 1, 2021
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Playwright is a Python library to automate [Chromium](https://www.chromium.org/H

| | Linux | macOS | Windows |
| :--- | :---: | :---: | :---: |
| Chromium <!-- GEN:chromium-version -->93.0.4530.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Chromium <!-- GEN:chromium-version -->93.0.4543.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| WebKit <!-- GEN:webkit-version -->14.2<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Firefox <!-- GEN:firefox-version -->89.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |

Expand Down
13 changes: 13 additions & 0 deletions playwright/_impl/_api_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,16 @@ class FilePayload(TypedDict):
name: str
mimeType: str
buffer: bytes


class RemoteAddr(TypedDict):
ipAddress: str
port: int


class SecurityDetails(TypedDict):
issuer: Optional[str]
protocol: Optional[str]
subjectName: Optional[str]
validFrom: Optional[int]
validTo: Optional[int]
12 changes: 10 additions & 2 deletions playwright/_impl/_element_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ async def select_option(
label: Union[str, List[str]] = None,
element: Union["ElementHandle", List["ElementHandle"]] = None,
timeout: float = None,
force: bool = None,
noWaitAfter: bool = None,
) -> List[str]:
params = locals_to_params(
Expand All @@ -165,13 +166,20 @@ async def tap(
await self._channel.send("tap", locals_to_params(locals()))

async def fill(
self, value: str, timeout: float = None, noWaitAfter: bool = None
self,
value: str,
timeout: float = None,
noWaitAfter: bool = None,
force: bool = None,
) -> None:
await self._channel.send("fill", locals_to_params(locals()))

async def select_text(self, timeout: float = None) -> None:
async def select_text(self, force: bool = None, timeout: float = None) -> None:
await self._channel.send("selectText", locals_to_params(locals()))

async def input_value(self, timeout: float = None) -> str:
return await self._channel.send("inputValue", locals_to_params(locals()))

async def set_input_files(
self,
files: Union[str, Path, FilePayload, List[Union[str, Path]], List[FilePayload]],
Expand Down
15 changes: 14 additions & 1 deletion playwright/_impl/_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,12 @@ async def tap(
await self._channel.send("tap", locals_to_params(locals()))

async def fill(
self, selector: str, value: str, timeout: float = None, noWaitAfter: bool = None
self,
selector: str,
value: str,
timeout: float = None,
noWaitAfter: bool = None,
force: bool = None,
) -> None:
await self._channel.send("fill", locals_to_params(locals()))

Expand Down Expand Up @@ -460,6 +465,7 @@ async def select_option(
element: Union["ElementHandle", List["ElementHandle"]] = None,
timeout: float = None,
noWaitAfter: bool = None,
force: bool = None,
) -> List[str]:
params = locals_to_params(
dict(
Expand All @@ -471,6 +477,13 @@ async def select_option(
)
return await self._channel.send("selectOption", params)

async def input_value(
self,
selector: str,
timeout: float = None,
) -> str:
return await self._channel.send("inputValue", locals_to_params(locals()))

async def set_input_files(
self,
selector: str,
Expand Down
8 changes: 7 additions & 1 deletion playwright/_impl/_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union, cast
from urllib import parse

from playwright._impl._api_structures import ResourceTiming
from playwright._impl._api_structures import RemoteAddr, ResourceTiming, SecurityDetails
from playwright._impl._api_types import Error
from playwright._impl._connection import (
ChannelOwner,
Expand Down Expand Up @@ -249,6 +249,12 @@ def status_text(self) -> str:
def headers(self) -> Dict[str, str]:
return parse_headers(self._initializer["headers"])

async def server_addr(self) -> Optional[RemoteAddr]:
return await self._channel.send("serverAddr")

async def security_details(self) -> Optional[SecurityDetails]:
return await self._channel.send("securityDetails")

async def finished(self) -> Optional[str]:
return await self._channel.send("finished")

Expand Down
12 changes: 11 additions & 1 deletion playwright/_impl/_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,12 @@ async def tap(
return await self._main_frame.tap(**locals_to_params(locals()))

async def fill(
self, selector: str, value: str, timeout: float = None, noWaitAfter: bool = None
self,
selector: str,
value: str,
timeout: float = None,
noWaitAfter: bool = None,
force: bool = None,
) -> None:
return await self._main_frame.fill(**locals_to_params(locals()))

Expand Down Expand Up @@ -644,10 +649,15 @@ async def select_option(
element: Union["ElementHandle", List["ElementHandle"]] = None,
timeout: float = None,
noWaitAfter: bool = None,
force: bool = None,
) -> List[str]:
params = locals_to_params(locals())
return await self._main_frame.select_option(**params)

async def input_value(self, selector: str, timeout: float = None) -> str:
params = locals_to_params(locals())
return await self._main_frame.input_value(**params)

async def set_input_files(
self,
selector: str,
Expand Down
Loading