Skip to content

Commit 816ad6e

Browse files
committed
[py] remove outdated touch actions implementation
1 parent 8b984a0 commit 816ad6e

7 files changed

Lines changed: 0 additions & 292 deletions

File tree

py/docs/source/api.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Webdriver.common
2828
selenium.webdriver.common.log
2929
selenium.webdriver.common.print_page_options
3030
selenium.webdriver.common.proxy
31-
selenium.webdriver.common.touch_actions
3231
selenium.webdriver.common.utils
3332
selenium.webdriver.common.service
3433
selenium.webdriver.common.html5.application_cache

py/docs/source/webdriver/selenium.webdriver.common.touch_actions.rst

Lines changed: 0 additions & 29 deletions
This file was deleted.

py/selenium/webdriver/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
from .remote.webdriver import WebDriver as Remote # noqa
3535
from .common.desired_capabilities import DesiredCapabilities # noqa
3636
from .common.action_chains import ActionChains # noqa
37-
from .common.touch_actions import TouchActions # noqa
3837
from .common.proxy import Proxy # noqa
3938
from .common.keys import Keys # noqa
4039

py/selenium/webdriver/common/touch_actions.py

Lines changed: 0 additions & 192 deletions
This file was deleted.

py/selenium/webdriver/remote/command.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,6 @@ class Command(object):
127127
SET_SCREEN_ORIENTATION = "setScreenOrientation"
128128
GET_SCREEN_ORIENTATION = "getScreenOrientation"
129129

130-
# Touch Actions
131-
SINGLE_TAP = "touchSingleTap"
132-
TOUCH_DOWN = "touchDown"
133-
TOUCH_UP = "touchUp"
134-
TOUCH_MOVE = "touchMove"
135-
TOUCH_SCROLL = "touchScroll"
136-
DOUBLE_TAP = "touchDoubleTap"
137-
LONG_PRESS = "touchLongPress"
138-
FLICK = "touchFlick"
139-
140130
# HTML 5
141131
EXECUTE_SQL = "executeSql"
142132

py/selenium/webdriver/remote/remote_connection.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -313,22 +313,6 @@ def __init__(self, remote_server_addr, keep_alive=False, resolve_ip=None, ignore
313313
('POST', '/session/$sessionId/orientation'),
314314
Command.GET_SCREEN_ORIENTATION:
315315
('GET', '/session/$sessionId/orientation'),
316-
Command.SINGLE_TAP:
317-
('POST', '/session/$sessionId/touch/click'),
318-
Command.TOUCH_DOWN:
319-
('POST', '/session/$sessionId/touch/down'),
320-
Command.TOUCH_UP:
321-
('POST', '/session/$sessionId/touch/up'),
322-
Command.TOUCH_MOVE:
323-
('POST', '/session/$sessionId/touch/move'),
324-
Command.TOUCH_SCROLL:
325-
('POST', '/session/$sessionId/touch/scroll'),
326-
Command.DOUBLE_TAP:
327-
('POST', '/session/$sessionId/touch/doubleclick'),
328-
Command.LONG_PRESS:
329-
('POST', '/session/$sessionId/touch/longclick'),
330-
Command.FLICK:
331-
('POST', '/session/$sessionId/touch/flick'),
332316
Command.EXECUTE_SQL:
333317
('POST', '/session/$sessionId/execute_sql'),
334318
Command.GET_LOCATION:

py/test/selenium/webdriver/common/w3c_interaction_tests.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -216,49 +216,6 @@ def test_pen_pointer_properties(driver, pages):
216216
assert events[6]["twist"] == 0
217217

218218

219-
@pytest.mark.xfail_firefox
220-
@pytest.mark.xfail_remote
221-
def test_touch_pointer_properties(driver, pages):
222-
pages.load("pointerActionsPage.html")
223-
pointerArea = driver.find_element(By.CSS_SELECTOR, "#pointerArea")
224-
center = _get_inview_center(pointerArea.rect, _get_viewport_rect(driver))
225-
touch_input = PointerInput(interaction.POINTER_TOUCH, "touch")
226-
touch_chain = ActionBuilder(driver, mouse=touch_input)
227-
touch_chain.pointer_action.move_to(pointerArea, x=50, y=25) \
228-
.pointer_down(width=23, height=31, pressure=0.78, tilt_x=21, tilt_y=-8, twist=355) \
229-
.move_to(pointerArea, x=60, y=35, width=39, height=35, pressure=0.91, tilt_x=-19, tilt_y=62, twist=345) \
230-
.pointer_up() \
231-
.move_to(pointerArea, x=80, y=50)
232-
touch_chain.perform()
233-
events = _get_events(driver)
234-
assert len(events) == 7
235-
event_types = [e["type"] for e in events]
236-
assert ["pointerover", "pointerenter", "pointerdown", "pointermove",
237-
"pointerup", "pointerout", "pointerleave"] == event_types
238-
assert events[2]["type"] == "pointerdown"
239-
assert events[2]["pageX"] == pytest.approx(center["x"], abs=1.0)
240-
assert events[2]["pageY"] == pytest.approx(center["y"], abs=1.0)
241-
assert events[2]["target"] == "pointerArea"
242-
assert events[2]["pointerType"] == "touch"
243-
assert round(events[2]["width"], 2) == 23
244-
assert round(events[2]["height"], 2) == 31
245-
assert round(events[2]["pressure"], 2) == 0.78
246-
assert events[2]["tiltX"] == 21
247-
assert events[2]["tiltY"] == -8
248-
assert events[2]["twist"] == 355
249-
assert events[3]["type"] == "pointermove"
250-
assert events[3]["pageX"] == pytest.approx(center["x"] + 10, abs=1.0)
251-
assert events[3]["pageY"] == pytest.approx(center["y"] + 10, abs=1.0)
252-
assert events[3]["target"] == "pointerArea"
253-
assert events[3]["pointerType"] == "touch"
254-
assert round(events[3]["width"], 2) == 39
255-
assert round(events[3]["height"], 2) == 35
256-
assert round(events[3]["pressure"], 2) == 0.91
257-
assert events[3]["tiltX"] == -19
258-
assert events[3]["tiltY"] == 62
259-
assert events[3]["twist"] == 345
260-
261-
262219
def _performDragAndDropWithMouse(driver, pages):
263220
"""Copied from org.openqa.selenium.interactions.TestBasicMouseInterface."""
264221
pages.load("draggableLists.html")

0 commit comments

Comments
 (0)