All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.yandex.qatools.ashot.coordinates.WebDriverCoordsProvider Maven / Gradle / Ivy

There is a newer version: 1.5.4
Show newest version
package ru.yandex.qatools.ashot.coordinates;

import org.openqa.selenium.Dimension;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;


/**
 * @author Pavel Zorin
 */

public class WebDriverCoordsProvider extends CoordsProvider {
    @Override
    public Coords ofElement(WebDriver driver, WebElement element) {
        Point point = element.getLocation();
        Dimension dimension = element.getSize();
        return new Coords(
                point.getX(),
                point.getY(),
                dimension.getWidth(),
                dimension.getHeight());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy