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

io.magentys.cinnamon.webdriver.actions.absolute.OffsetAction Maven / Gradle / Ivy

There is a newer version: 0.2.0
Show newest version
package io.magentys.cinnamon.webdriver.actions.absolute;

import io.magentys.cinnamon.webdriver.actions.Action;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebElement;

public class OffsetAction implements Action {

    private final Point offset;
    private final AbsolutePointAction delegate;

    public OffsetAction(final int x, final int y, final AbsolutePointAction delegate) {
        this.offset = new Point(x, y);
        this.delegate = delegate;
    }

    @Override
    public void perform(final WebElement target) {
        delegate.perform(target.getLocation().moveBy(offset.x, offset.y));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy