From d0ee67ec46b2b25c7c9f3b23e50b68bc6d9dc2e5 Mon Sep 17 00:00:00 2001 From: Jason Leyba Date: Wed, 18 Dec 2013 16:03:46 -0800 Subject: [PATCH] Update a test to actually change an element's location before checking that the location changed. --- .../selenium/interactions/touch/TouchDoubleTapTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/client/test/org/openqa/selenium/interactions/touch/TouchDoubleTapTest.java b/java/client/test/org/openqa/selenium/interactions/touch/TouchDoubleTapTest.java index b7cc55733e9c6..79f06130b8101 100644 --- a/java/client/test/org/openqa/selenium/interactions/touch/TouchDoubleTapTest.java +++ b/java/client/test/org/openqa/selenium/interactions/touch/TouchDoubleTapTest.java @@ -23,6 +23,7 @@ import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Action; +import org.openqa.selenium.internal.Locatable; /** * Tests the basic double tap operations. @@ -44,14 +45,13 @@ public void testCanDoubleTapOnAnImageAndAlterLocationOfElementsInScreen() { driver.get(pages.longContentPage); WebElement image = driver.findElement(By.id("imagestart")); - int y = image.getLocation().y; + int y = ((Locatable) image).getCoordinates().inViewPort().y; // The element is located at a certain point, after double tapping, // the y coordinate must change. assertTrue(y > 100); doubleTapOnElement("imagestart"); - - y = image.getLocation().y; + y = ((Locatable) image).getCoordinates().inViewPort().y; assertTrue(y < 50); }