Search in sources :

Example 6 with Coordinates

use of org.openqa.selenium.interactions.internal.Coordinates in project selenium_java by sergueik.

the class BaseTest method scrolltoElement.

// origin:
// https://github.com/TsvetomirSlavov/JavaScriptForSeleniumMyCollection/blob/master/src/utils/UtilsQAAutoman.java
public void scrolltoElement(WebElement element) {
    Coordinates coordinate = ((Locatable) element).getCoordinates();
    coordinate.onPage();
    coordinate.inViewPort();
}
Also used : Coordinates(org.openqa.selenium.interactions.internal.Coordinates) Locatable(org.openqa.selenium.internal.Locatable)

Aggregations

Coordinates (org.openqa.selenium.interactions.internal.Coordinates)6 Locatable (org.openqa.selenium.internal.Locatable)6 WebElement (org.openqa.selenium.WebElement)5 Test (org.testng.annotations.Test)5 HasInputDevices (org.openqa.selenium.interactions.HasInputDevices)4 Mouse (org.openqa.selenium.interactions.Mouse)4 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)2 Point (org.openqa.selenium.Point)2 InvalidSelectorException (org.openqa.selenium.InvalidSelectorException)1 NoAlertPresentException (org.openqa.selenium.NoAlertPresentException)1 WebDriver (org.openqa.selenium.WebDriver)1 WebDriverException (org.openqa.selenium.WebDriverException)1 UnreachableBrowserException (org.openqa.selenium.remote.UnreachableBrowserException)1