Skip to content

Commit 6db9e15

Browse files
committed
Merge branch 'master' into remove-touch-multi-actions
2 parents 209dca9 + 6f48898 commit 6db9e15

File tree

3 files changed

+85
-2
lines changed

3 files changed

+85
-2
lines changed

CHANGELOG.rst

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,84 @@ Changelog
22
=========
33

44

5+
v3.2.0 (2024-02-24)
6+
-------------------
7+
8+
New
9+
~~~
10+
- Feat: add pause in drag_and_drop (#961) [Kazuaki Matsuo]
11+
12+
* feat: add pause in drag_and_drop
13+
14+
* docs: tweak docstring
15+
16+
* Update action_helpers.py
17+
18+
* apply pause only when the value is not negative
19+
20+
Fix
21+
~~~
22+
- Add return self in MultiAction#add (#964) [Kazuaki Matsuo]
23+
24+
Other
25+
~~~~~
26+
- Bump 3.2.0. [Kazuaki Matsuo]
27+
- Chore(deps): update selenium requirement from ~=4.17 to ~=4.18 (#958)
28+
[dependabot[bot], dependabot[bot]]
29+
30+
Updates the requirements on [selenium](https://github.com/SeleniumHQ/Selenium) to permit the latest version.
31+
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
32+
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.17.0...selenium-4.18.1)
33+
34+
---
35+
updated-dependencies:
36+
- dependency-name: selenium
37+
dependency-type: direct:production
38+
...
39+
- Chore(deps-dev): update pytest requirement from ~=7.4 to ~=8.0 (#953)
40+
[dependabot[bot], dependabot[bot]]
41+
42+
Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version.
43+
- [Release notes](https://github.com/pytest-dev/pytest/releases)
44+
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
45+
- [Commits](https://github.com/pytest-dev/pytest/compare/7.4.0...8.0.0)
46+
47+
---
48+
updated-dependencies:
49+
- dependency-name: pytest
50+
dependency-type: direct:development
51+
...
52+
- Chore(deps): update selenium requirement from ~=4.15 to ~=4.17 (#948)
53+
[dependabot[bot], dependabot[bot]]
54+
55+
Updates the requirements on [selenium](https://github.com/SeleniumHQ/Selenium) to permit the latest version.
56+
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
57+
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.15.0...selenium-4.17.0)
58+
59+
---
60+
updated-dependencies:
61+
- dependency-name: selenium
62+
dependency-type: direct:production
63+
...
64+
- Docs: update W3C actions example in readme (#946) [Dor Blayzer]
65+
- Chore(deps-dev): update tox requirement from ~=4.11 to ~=4.12 (#947)
66+
[dependabot[bot], dependabot[bot]]
67+
68+
Updates the requirements on [tox](https://github.com/tox-dev/tox) to permit the latest version.
69+
- [Release notes](https://github.com/tox-dev/tox/releases)
70+
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
71+
- [Commits](https://github.com/tox-dev/tox/compare/4.11.0...4.12.0)
72+
73+
---
74+
updated-dependencies:
75+
- dependency-name: tox
76+
dependency-type: direct:development
77+
...
78+
- Docs: update example in readme (#945) [Kazuaki Matsuo]
79+
- Docs: update links (#944) [Kazuaki Matsuo]
80+
- Update changelog for 3.1.1. [Kazuaki Matsuo]
81+
82+
583
v3.1.1 (2023-12-15)
684
-------------------
785

appium/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = '3.1.1'
1+
version = '3.2.0'

appium/webdriver/extensions/action_helpers.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,24 @@ def scroll(self, origin_el: WebElement, destination_el: WebElement, duration: Op
6161
actions.perform()
6262
return cast('WebDriver', self)
6363

64-
def drag_and_drop(self, origin_el: WebElement, destination_el: WebElement) -> 'WebDriver':
64+
def drag_and_drop(
65+
self, origin_el: WebElement, destination_el: WebElement, pause: Optional[float] = None
66+
) -> 'WebDriver':
6567
"""Drag the origin element to the destination element
6668
6769
Args:
6870
origin_el: the element to drag
6971
destination_el: the element to drag to
72+
pause: how long the action pauses before moving after the tap and hold, in float seconds.
7073
7174
Returns:
7275
Union['WebDriver', 'ActionHelpers']: Self instance
7376
"""
7477
actions = ActionChains(self)
7578
# 'mouse' pointer action
7679
actions.w3c_actions.pointer_action.click_and_hold(origin_el)
80+
if pause is not None and pause > 0:
81+
actions.w3c_actions.pointer_action.pause(pause)
7782
actions.w3c_actions.pointer_action.move_to(destination_el)
7883
actions.w3c_actions.pointer_action.release()
7984
actions.perform()

0 commit comments

Comments
 (0)