Skip to content

Commit 8654434

Browse files
authored
feat(roll): roll Playwright 1.4.0 (microsoft#186)
1 parent f5f9614 commit 8654434

File tree

6 files changed

+12
-19
lines changed

6 files changed

+12
-19
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# 🎭 [Playwright](https://github.com/microsoft/playwright) for Python
22

3-
[![PyPI version](https://badge.fury.io/py/playwright.svg)](https://pypi.python.org/pypi/playwright/) [![PyPI pyversions](https://img.shields.io/pypi/pyversions/playwright.svg)](https://pypi.python.org/pypi/playwright/) [![Join Slack](https://img.shields.io/badge/join-slack-infomational)](https://join.slack.com/t/playwright/shared_invite/enQtOTEyMTUxMzgxMjIwLThjMDUxZmIyNTRiMTJjNjIyMzdmZDA3MTQxZWUwZTFjZjQwNGYxZGM5MzRmNzZlMWI5ZWUyOTkzMjE5Njg1NDg) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-86.0.4217.0-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-80.0b8-blue.svg?logo=mozilla-firefox)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> [![WebKit version](https://img.shields.io/badge/webkit-14.0-blue.svg?logo=safari)](https://webkit.org/)
3+
[![PyPI version](https://badge.fury.io/py/playwright.svg)](https://pypi.python.org/pypi/playwright/) [![PyPI pyversions](https://img.shields.io/pypi/pyversions/playwright.svg)](https://pypi.python.org/pypi/playwright/) [![Join Slack](https://img.shields.io/badge/join-slack-infomational)](https://join.slack.com/t/playwright/shared_invite/enQtOTEyMTUxMzgxMjIwLThjMDUxZmIyNTRiMTJjNjIyMzdmZDA3MTQxZWUwZTFjZjQwNGYxZGM5MzRmNzZlMWI5ZWUyOTkzMjE5Njg1NDg) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-86.0.4238.0-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-80.0b8-blue.svg?logo=mozilla-firefox)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> [![WebKit version](https://img.shields.io/badge/webkit-14.0-blue.svg?logo=safari)](https://webkit.org/)
44

55
##### [Docs](#documentation) | [API reference](https://playwright.dev/#?path=docs/api.md) | [Docstrings](https://github.com/microsoft/playwright-python/blob/master/playwright/sync_api.py)
66

77
Playwright is a Python library to automate [Chromium](https://www.chromium.org/Home), [Firefox](https://www.mozilla.org/en-US/firefox/new/) and [WebKit](https://webkit.org/) with a single API. Playwright is built to enable cross-browser web automation that is **ever-green**, **capable**, **reliable** and **fast**.
88

99
| | Linux | macOS | Windows |
1010
| :--- | :---: | :---: | :---: |
11-
| Chromium <!-- GEN:chromium-version -->86.0.4217.0<!-- GEN:stop --> ||||
11+
| Chromium <!-- GEN:chromium-version -->86.0.4238.0<!-- GEN:stop --> ||||
1212
| WebKit 14.0 ||||
1313
| Firefox <!-- GEN:firefox-version -->80.0b8<!-- GEN:stop --> ||||
1414

driver/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"license": "Apache-2.0",
1515
"dependencies": {
16-
"playwright": "1.3.0-next.1599061793983"
16+
"playwright": "1.4.0"
1717
},
1818
"devDependencies": {
1919
"pkg": "^4.4.9"

playwright/drivers/browsers.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
"browsers": [
44
{
55
"name": "chromium",
6-
"revision": "792639",
6+
"revision": "799411",
77
"download": true
88
},
99
{
1010
"name": "firefox",
11-
"revision": "1167",
11+
"revision": "1171",
1212
"download": true
1313
},
1414
{
1515
"name": "webkit",
16-
"revision": "1334",
16+
"revision": "1343",
1717
"download": true
1818
}
1919
]

playwright/element_handle.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ def __init__(
5151
) -> None:
5252
super().__init__(parent, type, guid, initializer)
5353

54+
async def _createSelectorForTest(self, name: str) -> Optional[str]:
55+
return await self._channel.send("createSelectorForTest", dict(name=name))
56+
5457
def toString(self) -> str:
5558
return self._preview
5659

playwright/selectors.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313
# limitations under the License.
1414

1515
from pathlib import Path
16-
from typing import Dict, Optional, Union
16+
from typing import Dict, Union
1717

1818
from playwright.connection import ChannelOwner
19-
from playwright.element_handle import ElementHandle
2019
from playwright.helper import Error
2120

2221

@@ -42,8 +41,3 @@ async def register(
4241
if contentScript:
4342
params["contentScript"] = True
4443
await self._channel.send("register", params)
45-
46-
async def _createSelector(self, name: str, handle: ElementHandle) -> Optional[str]:
47-
return await self._channel.send(
48-
"createSelector", dict(name=name, handle=handle._channel)
49-
)

tests/async/test_queryselector.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@ async def test_selectors_register_should_work(selectors, page: Page, utils):
2323
}""",
2424
)
2525
await page.setContent("<div><span></span></div><div></div>")
26-
assert (
27-
await selectors._impl_obj._createSelector(
28-
"tag", cast(Any, await page.querySelector("div"))._impl_obj
29-
)
30-
== "DIV"
31-
)
26+
element_handle_impl = cast(Any, (await page.querySelector("div")))._impl_obj
27+
assert await element_handle_impl._createSelectorForTest("tag") == "DIV"
3228
assert await page.evalOnSelector("tag=DIV", "e => e.nodeName") == "DIV"
3329
assert await page.evalOnSelector("tag=SPAN", "e => e.nodeName") == "SPAN"
3430
assert await page.evalOnSelectorAll("tag=DIV", "es => es.length") == 2

0 commit comments

Comments
 (0)