File tree 1 file changed +3
-3
lines changed
java/client/test/org/openqa/selenium/interactions/touch
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 23
23
import org .openqa .selenium .WebDriver ;
24
24
import org .openqa .selenium .WebElement ;
25
25
import org .openqa .selenium .interactions .Action ;
26
+ import org .openqa .selenium .internal .Locatable ;
26
27
27
28
/**
28
29
* Tests the basic double tap operations.
@@ -44,14 +45,13 @@ public void testCanDoubleTapOnAnImageAndAlterLocationOfElementsInScreen() {
44
45
driver .get (pages .longContentPage );
45
46
46
47
WebElement image = driver .findElement (By .id ("imagestart" ));
47
- int y = image . getLocation ().y ;
48
+ int y = (( Locatable ) image ). getCoordinates (). inViewPort ().y ;
48
49
// The element is located at a certain point, after double tapping,
49
50
// the y coordinate must change.
50
51
assertTrue (y > 100 );
51
52
52
53
doubleTapOnElement ("imagestart" );
53
-
54
- y = image .getLocation ().y ;
54
+ y = ((Locatable ) image ).getCoordinates ().inViewPort ().y ;
55
55
assertTrue (y < 50 );
56
56
}
57
57
You can’t perform that action at this time.
0 commit comments