Skip to content
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 DRIVER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a1f35e1955976e84411f9c10358228a80b763ebe
bbd948344ea9a60bf1e6f125c02ca99b2b51593b
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 -->158.0.8127.18<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Chromium <!-- GEN:chromium-version -->159.0.8154.6<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| WebKit <!-- GEN:webkit-version -->27.2<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Firefox <!-- GEN:firefox-version -->159.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |

Expand Down
14 changes: 8 additions & 6 deletions tests/async/library/test_locator_highlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


async def test_LO_193_highlight_should_accept_a_css_string_style(
browser: Browser, server: Server, browser_name: str, is_frozen_webkit: bool
browser: Browser, server: Server, is_frozen_webkit: bool
) -> None:
if is_frozen_webkit:
pytest.skip("frozen WebKit")
Expand All @@ -40,14 +40,16 @@ async def test_LO_193_highlight_should_accept_a_css_string_style(
await expect(highlight).to_be_visible()
style = await highlight.evaluate(
"""el => ({
outline: el.style.outline,
// Browsers serialize the 'outline' shorthand in different orders, check the longhands.
outlineWidth: el.style.outlineWidth,
outlineStyle: el.style.outlineStyle,
outlineColor: el.style.outlineColor,
backgroundColor: el.style.backgroundColor,
})"""
)
if browser_name == "chromium" or browser_name == "firefox":
assert style["outline"] == "rgb(255, 0, 0) solid 3px"
else:
assert style["outline"] == "3px solid rgb(255, 0, 0)"
assert style["outlineWidth"] == "3px"
assert style["outlineStyle"] == "solid"
assert style["outlineColor"] == "rgb(255, 0, 0)"
assert style["backgroundColor"] == "rgba(0, 255, 0, 0.25)"

await context.close()
Expand Down
14 changes: 8 additions & 6 deletions tests/sync/library/test_locator_highlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


def test_LO_193_highlight_should_accept_a_css_string_style(
browser: Browser, server: Server, browser_name: str, is_frozen_webkit: bool
browser: Browser, server: Server, is_frozen_webkit: bool
) -> None:
if is_frozen_webkit:
pytest.skip("frozen WebKit")
Expand All @@ -40,14 +40,16 @@ def test_LO_193_highlight_should_accept_a_css_string_style(
expect(highlight).to_be_visible()
style = highlight.evaluate(
"""el => ({
outline: el.style.outline,
// Browsers serialize the 'outline' shorthand in different orders, check the longhands.
outlineWidth: el.style.outlineWidth,
outlineStyle: el.style.outlineStyle,
outlineColor: el.style.outlineColor,
backgroundColor: el.style.backgroundColor,
})"""
)
if browser_name == "chromium" or browser_name == "firefox":
assert style["outline"] == "rgb(255, 0, 0) solid 3px"
else:
assert style["outline"] == "3px solid rgb(255, 0, 0)"
assert style["outlineWidth"] == "3px"
assert style["outlineStyle"] == "solid"
assert style["outlineColor"] == "rgb(255, 0, 0)"
assert style["backgroundColor"] == "rgba(0, 255, 0, 0.25)"

context.close()
Expand Down
Loading