Skip to content

chore: roll Playwright to 1.4.2 #200

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
Sep 28, 2020
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
775 changes: 642 additions & 133 deletions api.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion driver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"playwright": "1.4.0"
"playwright": "1.4.2"
},
"devDependencies": {
"pkg": "^4.4.9"
Expand Down
387 changes: 289 additions & 98 deletions playwright/async_api.py

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion playwright/element_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ async def boundingBox(self) -> Optional[FloatRect]:
async def screenshot(
self,
timeout: int = None,
type: Literal["png", "jpeg"] = None,
type: Literal["jpeg", "png"] = None,
path: Union[str, Path] = None,
quality: int = None,
omitBackground: bool = None,
Expand Down Expand Up @@ -246,6 +246,23 @@ async def evalOnSelectorAll(
)
)

async def waitForElementState(
self,
state: Literal["disabled", "enabled", "hidden", "stable", "visible"],
timeout: int = None,
) -> None:
await self._channel.send("waitForElementState", locals_to_params(locals()))

async def waitForSelector(
self,
selector: str,
state: Literal["attached", "detached", "hidden", "visible"] = None,
timeout: int = None,
) -> Optional["ElementHandle"]:
return from_nullable_channel(
await self._channel.send("waitForSelector", locals_to_params(locals()))
)


ValuesToSelect = Union[
str,
Expand Down
5 changes: 4 additions & 1 deletion playwright/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ def _on_frame_navigated(self, event: FrameNavigatedEvent) -> None:
if "error" not in event and hasattr(self, "_page") and self._page:
self._page.emit("framenavigated", self)

def page(self) -> "Page":
return self._page

async def goto(
self,
url: str,
Expand Down Expand Up @@ -234,7 +237,7 @@ async def waitForSelector(
self,
selector: str,
timeout: int = None,
state: Literal["attached", "detached", "visible", "hidden"] = None,
state: Literal["attached", "detached", "hidden", "visible"] = None,
) -> Optional[ElementHandle]:
return from_nullable_channel(
await self._channel.send("waitForSelector", locals_to_params(locals()))
Expand Down
12 changes: 6 additions & 6 deletions playwright/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
URLMatch = Union[str, Pattern, Callable[[str], bool]]
RouteHandler = Callable[["Route", "Request"], Any]

ColorScheme = Literal["light", "dark", "no-preference"]
DocumentLoadState = Literal["load", "domcontentloaded", "networkidle"]
ColorScheme = Literal["dark", "light", "no-preference"]
DocumentLoadState = Literal["domcontentloaded", "load", "networkidle"]
KeyboardModifier = Literal["Alt", "Control", "Meta", "Shift"]
MouseButton = Literal["left", "right", "middle"]
MouseButton = Literal["left", "middle", "right"]


class MousePosition(TypedDict):
Expand All @@ -69,9 +69,9 @@ class SelectOption(TypedDict):


class ConsoleMessageLocation(TypedDict):
url: Optional[str]
lineNumber: Optional[int]
columnNumber: Optional[int]
url: str
lineNumber: int
columnNumber: int


class ErrorPayload(TypedDict, total=False):
Expand Down
6 changes: 3 additions & 3 deletions playwright/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ async def waitForSelector(
self,
selector: str,
timeout: int = None,
state: Literal["attached", "detached", "visible", "hidden"] = None,
state: Literal["attached", "detached", "hidden", "visible"] = None,
) -> Optional[ElementHandle]:
return await self._main_frame.waitForSelector(**locals_to_params(locals()))

Expand Down Expand Up @@ -503,7 +503,7 @@ async def goForward(
)

async def emulateMedia(
self, media: Literal["screen", "print"] = None, colorScheme: ColorScheme = None,
self, media: Literal["print", "screen"] = None, colorScheme: ColorScheme = None,
) -> None:
await self._channel.send("emulateMedia", locals_to_params(locals()))

Expand Down Expand Up @@ -553,7 +553,7 @@ async def unroute(
async def screenshot(
self,
timeout: int = None,
type: Literal["png", "jpeg"] = None,
type: Literal["jpeg", "png"] = None,
path: Union[str, Path] = None,
quality: int = None,
omitBackground: bool = None,
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy