Skip to content
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

fix: mask_color for screenshots #2205

Merged
merged 2 commits into from
Jan 3, 2024
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 playwright/_impl/_browser_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ async def connect_over_cdp(
self,
endpointURL: str,
timeout: float = None,
slow_mo: float = None,
slowMo: float = None,
headers: Dict[str, str] = None,
) -> Browser:
params = locals_to_params(locals())
Expand Down
2 changes: 1 addition & 1 deletion playwright/_impl/_element_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ async def screenshot(
caret: Literal["hide", "initial"] = None,
scale: Literal["css", "device"] = None,
mask: Sequence["Locator"] = None,
mask_color: str = None,
maskColor: str = None,
) -> bytes:
params = locals_to_params(locals())
if "path" in params:
Expand Down
2 changes: 1 addition & 1 deletion playwright/_impl/_locator.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ async def screenshot(
caret: Literal["hide", "initial"] = None,
scale: Literal["css", "device"] = None,
mask: Sequence["Locator"] = None,
mask_color: str = None,
maskColor: str = None,
) -> bytes:
params = locals_to_params(locals())
return await self._with_element(
Expand Down
2 changes: 1 addition & 1 deletion playwright/_impl/_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ async def screenshot(
caret: Literal["hide", "initial"] = None,
scale: Literal["css", "device"] = None,
mask: Sequence["Locator"] = None,
mask_color: str = None,
maskColor: str = None,
) -> bytes:
params = locals_to_params(locals())
if "path" in params:
Expand Down
8 changes: 4 additions & 4 deletions playwright/async_api/_generated.py
Original file line number Diff line number Diff line change
Expand Up @@ -2837,7 +2837,7 @@ async def screenshot(
caret=caret,
scale=scale,
mask=mapping.to_impl(mask),
mask_color=mask_color,
maskColor=mask_color,
)
)

Expand Down Expand Up @@ -9992,7 +9992,7 @@ async def screenshot(
caret=caret,
scale=scale,
mask=mapping.to_impl(mask),
mask_color=mask_color,
maskColor=mask_color,
)
)

Expand Down Expand Up @@ -15100,7 +15100,7 @@ async def connect_over_cdp(
await self._impl_obj.connect_over_cdp(
endpointURL=endpoint_url,
timeout=timeout,
slow_mo=slow_mo,
slowMo=slow_mo,
headers=mapping.to_impl(headers),
)
)
Expand Down Expand Up @@ -17602,7 +17602,7 @@ async def screenshot(
caret=caret,
scale=scale,
mask=mapping.to_impl(mask),
mask_color=mask_color,
maskColor=mask_color,
)
)

Expand Down
8 changes: 4 additions & 4 deletions playwright/sync_api/_generated.py
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,7 @@ def screenshot(
caret=caret,
scale=scale,
mask=mapping.to_impl(mask),
mask_color=mask_color,
maskColor=mask_color,
)
)
)
Expand Down Expand Up @@ -10061,7 +10061,7 @@ def screenshot(
caret=caret,
scale=scale,
mask=mapping.to_impl(mask),
mask_color=mask_color,
maskColor=mask_color,
)
)
)
Expand Down Expand Up @@ -15171,7 +15171,7 @@ def connect_over_cdp(
self._impl_obj.connect_over_cdp(
endpointURL=endpoint_url,
timeout=timeout,
slow_mo=slow_mo,
slowMo=slow_mo,
headers=mapping.to_impl(headers),
)
)
Expand Down Expand Up @@ -17719,7 +17719,7 @@ def screenshot(
caret=caret,
scale=scale,
mask=mapping.to_impl(mask),
mask_color=mask_color,
maskColor=mask_color,
)
)
)
Expand Down