Skip to content

Commit 5ffa2ef

Browse files
authored
feat(roll): roll Playwright to 1.13.0-1626733671000 (#814)
1 parent 673eed8 commit 5ffa2ef

File tree

11 files changed

+332
-114
lines changed

11 files changed

+332
-114
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Playwright is a Python library to automate [Chromium](https://www.chromium.org/H
44

55
| | Linux | macOS | Windows |
66
| :--- | :---: | :---: | :---: |
7-
| Chromium <!-- GEN:chromium-version -->93.0.4543.0<!-- GEN:stop --> ||||
7+
| Chromium <!-- GEN:chromium-version -->93.0.4576.0<!-- GEN:stop --> ||||
88
| WebKit <!-- GEN:webkit-version -->14.2<!-- GEN:stop --> ||||
9-
| Firefox <!-- GEN:firefox-version -->89.0<!-- GEN:stop --> ||||
9+
| Firefox <!-- GEN:firefox-version -->90.0<!-- GEN:stop --> ||||
1010

1111
## Documentation
1212

playwright/_impl/_browser_type.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ async def launch(
8585
try:
8686
return from_channel(await self._channel.send("launch", params))
8787
except Exception as e:
88-
if "because executable doesn't exist" in str(e):
88+
if "npx playwright install" in str(e):
8989
raise not_installed_error(f'"{self.name}" browser was not found.')
9090
raise e
9191

@@ -145,7 +145,7 @@ async def launch_persistent_context(
145145
context._options = params
146146
return context
147147
except Exception as e:
148-
if "because executable doesn't exist" in str(e):
148+
if "npx playwright install" in str(e):
149149
raise not_installed_error(f'"{self.name}" browser was not found.')
150150
raise e
151151

playwright/_impl/_frame.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,17 @@ async def hover(
466466
) -> None:
467467
await self._channel.send("hover", locals_to_params(locals()))
468468

469+
async def drag_and_drop(
470+
self,
471+
source: str,
472+
target: str,
473+
force: bool = None,
474+
noWaitAfter: bool = None,
475+
timeout: float = None,
476+
trial: bool = None,
477+
) -> None:
478+
await self._channel.send("dragAndDrop", locals_to_params(locals()))
479+
469480
async def select_option(
470481
self,
471482
selector: str,

playwright/_impl/_page.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,17 @@ async def hover(
649649
) -> None:
650650
return await self._main_frame.hover(**locals_to_params(locals()))
651651

652+
async def drag_and_drop(
653+
self,
654+
source: str,
655+
target: str,
656+
force: bool = None,
657+
noWaitAfter: bool = None,
658+
timeout: float = None,
659+
trial: bool = None,
660+
) -> None:
661+
return await self._main_frame.drag_and_drop(**locals_to_params(locals()))
662+
652663
async def select_option(
653664
self,
654665
selector: str,

playwright/async_api/_generated.py

Lines changed: 141 additions & 49 deletions
Large diffs are not rendered by default.

playwright/sync_api/_generated.py

Lines changed: 141 additions & 49 deletions
Large diffs are not rendered by default.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
InWheel = None
2929
from wheel.bdist_wheel import bdist_wheel as BDistWheelCommand
3030

31-
driver_version = "1.13.0-next-1626254028000"
31+
driver_version = "1.13.0-1626733671000"
3232

3333

3434
def extractall(zip: zipfile.ZipFile, path: str) -> None:

tests/assets/drag-n-drop.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
ev.preventDefault();
2929
var data = ev.dataTransfer.getData("text");
3030
ev.target.appendChild(document.getElementById(data));
31-
ev.dataTransfer.clearData();
3231
}
3332
</script>
3433

tests/async/test_launcher.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async def test_browser_type_launch_should_reject_if_executable_path_is_invalid(
5858
await browser_type.launch(
5959
**launch_arguments, executable_path="random-invalid-path"
6060
)
61-
assert "browser was not found" in exc.value.message
61+
assert "executable doesn't exist" in exc.value.message
6262

6363

6464
async def test_browser_type_executable_path_should_work(browser_type, browser_channel):
@@ -102,15 +102,6 @@ async def test_browser_close_should_be_callable_twice(browser_type, launch_argum
102102
await browser.close()
103103

104104

105-
async def test_browser_launch_non_existing_executable_path_shows_install_msg(
106-
browser_type,
107-
tmpdir,
108-
):
109-
with pytest.raises(Error) as exc_info:
110-
await browser_type.launch(executable_path=tmpdir.join("executable"))
111-
assert "python -m playwright install" in exc_info.value.message
112-
113-
114105
@pytest.mark.only_browser("chromium")
115106
async def test_browser_launch_should_return_background_pages(
116107
browser_type: BrowserType,

tests/async/test_page.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,3 +1270,14 @@ async def test_input_value(page: Page, server: Server):
12701270

12711271
await page.fill("input", "")
12721272
assert await page.input_value("input") == ""
1273+
1274+
1275+
async def test_drag_and_drop_helper_method(page: Page, server: Server):
1276+
await page.goto(server.PREFIX + "/drag-n-drop.html")
1277+
await page.drag_and_drop("#source", "#target")
1278+
assert (
1279+
await page.eval_on_selector(
1280+
"#target", "target => target.contains(document.querySelector('#source'))"
1281+
)
1282+
is True
1283+
)

0 commit comments

Comments
 (0)