Skip to content

Commit 2512868

Browse files
committed
[py] Removing dubious testMovingMouseBackAndForthPastViewPort that expects to be able to move to and click elements that are outside of the viewport
1 parent 62eabcc commit 2512868

1 file changed

Lines changed: 0 additions & 54 deletions

File tree

py/test/selenium/webdriver/common/interactions_tests.py

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
# under the License.
1717

1818
"""Tests for advanced user interactions."""
19-
import sys
20-
2119
import pytest
2220

2321
from selenium.webdriver.common.keys import Keys
@@ -27,10 +25,6 @@
2725

2826
class TestAdvancedUserInteraction(object):
2927

30-
def _before(self, driver):
31-
if driver.capabilities['browserName'] == 'firefox' and sys.platform == 'darwin':
32-
pytest.skip("native events not supported on Mac for Firefox")
33-
3428
def performDragAndDropWithMouse(self, driver, pages):
3529
"""Copied from org.openqa.selenium.interactions.TestBasicMouseInterface."""
3630
if driver.capabilities['browserName'] == 'firefox':
@@ -213,54 +207,6 @@ def testSelectingMultipleItems(self, driver, pages):
213207
actionsBuilder.click(listItems[6]).perform()
214208
assert "#item7" == reportingElement.text
215209

216-
@pytest.mark.ignore_chrome
217-
def testMovingMouseBackAndForthPastViewPort(self, driver, pages):
218-
if driver.capabilities['browserName'] == 'phantomjs':
219-
pytest.xfail("phantomjs driver does not seem to trigger the events")
220-
if driver.capabilities['browserName'] == 'firefox':
221-
pytest.skip("Actions not available in Marionette. https://bugzilla.mozilla.org/show_bug.cgi?id=1292178")
222-
self._before(driver)
223-
pages.load("veryLargeCanvas.html")
224-
225-
firstTarget = driver.find_element_by_id("r1")
226-
ActionChains(driver) \
227-
.move_to_element(firstTarget) \
228-
.click() \
229-
.perform()
230-
resultArea = driver.find_element_by_id("result")
231-
expectedEvents = "First"
232-
wait = WebDriverWait(resultArea, 15)
233-
234-
def expectedEventsFired(element):
235-
return element.text == expectedEvents
236-
237-
wait.until(expectedEventsFired)
238-
239-
# Move to element with id 'r2', at (2500, 50) to (2580, 100).
240-
ActionChains(driver) \
241-
.move_by_offset(2540 - 150, 75 - 125) \
242-
.click() \
243-
.perform()
244-
245-
expectedEvents += " Second"
246-
wait.until(expectedEventsFired)
247-
248-
# Move to element with id 'r3' at (60, 1500) to (140, 1550).
249-
ActionChains(driver) \
250-
.move_by_offset(100 - 2540, 1525 - 75) \
251-
.click() \
252-
.perform()
253-
expectedEvents += " Third"
254-
wait.until(expectedEventsFired)
255-
256-
# Move to element with id 'r4' at (220,180) to (320, 230).
257-
ActionChains(driver) \
258-
.move_by_offset(270 - 100, 205 - 1525) \
259-
.click() \
260-
.perform()
261-
expectedEvents += " Fourth"
262-
wait.until(expectedEventsFired)
263-
264210
def testSendingKeysToActiveElementWithModifier(self, driver, pages):
265211
if driver.capabilities['browserName'] == 'firefox':
266212
pytest.skip("Actions not available in Marionette. https://bugzilla.mozilla.org/show_bug.cgi?id=1292178")

0 commit comments

Comments
 (0)