Skip to content

Commit d0ee67e

Browse files
committed
Update a test to actually change an element's location before checking
that the location changed.
1 parent 411afbb commit d0ee67e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: java/client/test/org/openqa/selenium/interactions/touch/TouchDoubleTapTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.openqa.selenium.WebDriver;
2424
import org.openqa.selenium.WebElement;
2525
import org.openqa.selenium.interactions.Action;
26+
import org.openqa.selenium.internal.Locatable;
2627

2728
/**
2829
* Tests the basic double tap operations.
@@ -44,14 +45,13 @@ public void testCanDoubleTapOnAnImageAndAlterLocationOfElementsInScreen() {
4445
driver.get(pages.longContentPage);
4546

4647
WebElement image = driver.findElement(By.id("imagestart"));
47-
int y = image.getLocation().y;
48+
int y = ((Locatable) image).getCoordinates().inViewPort().y;
4849
// The element is located at a certain point, after double tapping,
4950
// the y coordinate must change.
5051
assertTrue(y > 100);
5152

5253
doubleTapOnElement("imagestart");
53-
54-
y = image.getLocation().y;
54+
y = ((Locatable) image).getCoordinates().inViewPort().y;
5555
assertTrue(y < 50);
5656
}
5757

0 commit comments

Comments
 (0)