|
16 | 16 | # under the License. |
17 | 17 |
|
18 | 18 | """Tests for advanced user interactions.""" |
19 | | -import sys |
20 | | - |
21 | 19 | import pytest |
22 | 20 |
|
23 | 21 | from selenium.webdriver.common.keys import Keys |
|
27 | 25 |
|
28 | 26 | class TestAdvancedUserInteraction(object): |
29 | 27 |
|
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 | | - |
34 | 28 | def performDragAndDropWithMouse(self, driver, pages): |
35 | 29 | """Copied from org.openqa.selenium.interactions.TestBasicMouseInterface.""" |
36 | 30 | if driver.capabilities['browserName'] == 'firefox': |
@@ -213,54 +207,6 @@ def testSelectingMultipleItems(self, driver, pages): |
213 | 207 | actionsBuilder.click(listItems[6]).perform() |
214 | 208 | assert "#item7" == reportingElement.text |
215 | 209 |
|
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 | | - |
264 | 210 | def testSendingKeysToActiveElementWithModifier(self, driver, pages): |
265 | 211 | if driver.capabilities['browserName'] == 'firefox': |
266 | 212 | pytest.skip("Actions not available in Marionette. https://bugzilla.mozilla.org/show_bug.cgi?id=1292178") |
|
0 commit comments